Intel 8XC196K Series User Manual page 136

Table of Contents

Advertisement

Figure 5-19. EPA and PTS Operations for the PWM Remap Mode Example
You can change the duty cycle by changing the time that the output is high and keeping the period
constant. After a timer match occurs for EPA1 (when the output falls), schedule the next EPA1
match for T2 + DT, where DT is the time to be added to the on-time. Thereafter, schedule the next
EPA1 match for T2. You can do this by replacing one EPA1 PTS interrupt with a normal interrupt
(clear PTSSEL.3). Have the interrupt service routine add T2 + DT to EPA1_TIME and set
PTSSEL.3 to re-enable PTS service for EPA1. This adjustment changes the duty cycle without
affecting the period.
By using two EPA channels in the PWM remap mode, you can generate duty cycles closer to 0%
and 100% than is possible with PWM toggle mode. For further information about generating
PWM waveforms with the EPA, consult "Operating in Compare Mode" on page 10-13.
Start
Start
Timer
Timer
No
No
Match
Match
?
?
Yes
Yes
If EPA0, set the output
If EPA0, set the output
If EPA1, clear the output
If EPA1, clear the output
If EPA0: EPA0_TIME = EPA0_TIME + T2
If EPA0: EPA0_TIME = EPA0_TIME + T2
If EPA1: EPA1_TIME = EPA1_TIME + T2
If EPA1: EPA1_TIME = EPA1_TIME + T2
Toggle TBIT
Toggle TBIT
(TBIT is not used)
(TBIT is not used)
STANDARD AND PTS INTERRUPTS
EPA
EPA
PTS Cycle
PTS
A2553-01
A2553-01
5-41

Advertisement

Table of Contents
loading

Table of Contents