We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X
Maximize Your Experience: Reap the Personalized Advantages by Completing Your Profile to Its Fullest. Update Here
Stay in the loop with the latest from Microchip. Update your profile while you are at it. Update Here
Complete your profile to access more resources. Update Here

AN539

Title
Title
Frequency and Resolution Options for PWM Outputs
Name
Name
AN539
Date
Date
06/24/2015
Application Categories
Application Categories
Peripheral / PWM
Product Categories
Product Categories
Power Management ICs / PWM Controllers
Description
Description
The PIC17C42 is equipped with two high frequency Pulse Width Modulation (PWM) outputs. In a pulse width modulated signal the period of the signal is (usually) kept fixed, while the duty cycle is varied. In this application note, we will discuss options in selecting PWM frequency and resolution. This application note assumes that the internal clock is used for the time-base, which is typically the preferred setup. Also, throughout this application note, PWM1 output is used in examples, Timer1 is assumed to be the time-base. less than 7-bits. Useful and Common PWM Modes While a variety of period values can be selected, the following modes would be most commonly used: 10-bit Mode: In this mode PWM duty cycle has full 10-bit resolution (maximum offered by the PIC17C42). The period register PR1 is set at FFh. PWM period = 1024TOSC = 64 ms. PWM frequency is 15.625 kHz. The user must write both PW1DCH and PW1DCL to update PWM output. See Appendix A for an example of code that modulates 10-bit resolution PWM output

Files


Title
Title
Date
Size
AN539 Source Code - Frequency and Resolution Options for PWM Outputs 29.6 KB 09/24/2021 AN539 Source Code - Frequency and Resolution Options for PWM Outputs 09/24/2021 29.6 KB Download

Live Chat

Need Help?

Privacy Policy