Intel 8XC196K Series User Manual page 131

Table of Contents

Advertisement

8XC196K x , J x , CA USER'S MANUAL
EPA0_TIME = EPA0_TIME + T1
EPA0_TIME = EPA0_TIME + T1
Figure 5-17. EPA and PTS Operations for the PWM Toggle Mode Example
Software can change the duty cycle during the PWM operation. When a duty cycle change is re-
quired, the program writes new values of T1 and T2 – T1 to CSTORE1 and CSTORE2 and selects
normal interrupt service for the next EPA0 interrupt. When the next timer match occurs, the out-
put is toggled, and the device executes a normal interrupt service routine, which performs these
operations:
1.
The routine writes the new value of T1 (in CSTORE1) to PTSCONST1 and the new value
of T1 – T2 (in CSTORE2) to PTSCONST2.
2.
It selects PTS service for the EPA0 interrupt.
5-36
Start
Start
Timer
Timer
No
No
Match
Match
?
?
Yes
Yes
Toggle Output
Toggle Output
= 0
= 0
TBIT
TBIT
EPA0_TIME = EPA0_TIME + (T2 - T1)
EPA0_TIME = EPA0_TIME + (T2 - T1)
Toggle TBIT
Toggle TBIT
EPA
EPA
PTS Cycle
PTS
= 1
= 1
A2552-02
A2552-02

Advertisement

Table of Contents
loading

Table of Contents