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
|
Title | Title | Download | Date | Size |
---|---|---|---|---|
AN539 Source Code - Frequency and Resolution Options for PWM Outputs 29.6 KB 06/24/2015 | AN539 Source Code - Frequency and Resolution Options for PWM Outputs | Download | 06/24/2015 | 29.6 KB |