General-Purpose Timers
GP Timer Compare PWM Exercise
GP Timer Compare PWM Exercise
GP Timer Compare PWM Exercise
Symmetric PWM is to be generated as follows:
Symmetric PWM is to be generated as follows:
•
•
50 kHz carrier frequency
50 kHz carrier frequency
•
•
Timer counter clocked by 10 ns CPU clock
Timer counter clocked by 10 ns CPU clock
•
•
Use the
Use the
÷
÷
1
1
prescale
prescale
option
option
•
•
25% duty cycle initially
25% duty cycle initially
•
•
Use GP Timer Compare 1 with PWM output active high
Use GP Timer Compare 1 with PWM output active high
•
•
T2PWM/T2CMP pins forced low
T2PWM/T2CMP pins forced low
Determine the initialization values needed in the GPTCONA,
Determine the initialization values needed in the GPTCONA,
T1CON, T1PR, and T1CMPR registers
T1CON, T1PR, and T1CMPR registers
C28x - Event Manager 7 - 17