8XC196NP, 80C196NU USER’S MANUAL
10-8
Figure 10-4. Quadrature Mode Timing and Count
10.4 EPA CHANNEL FUNCTIONAL OVERVIEW
The EPA has four programmable capture/compare channels that can perform the following tasks.
• capture the current timer value when a specified transition occurs on the EPA pin
• clear, set, or toggle the EPA pin when the timer value matches the programmed value in the
event-time register
• generate an interrupt when a capture or compare event occurs
• generate an interrupt when a capture overrun occurs
• reset its own base timer in compare mode
• reset the opposite timer in both compare and capture mode
Each EPA channel has a control register, EPAx_CON (capture/compare channel); an event-time
register, EPAx_TIME (capture/compare channel); and a timer input (Figure 10-5). The control
register selects the timer, the mode, and either the event to be captured or the event that is to occur.
The event-time register holds the captured timer value in capture mode and the event time in com-
pare mode. See “Programming the Capture/Compare Channels” on page 10-18 for configuration
information.
T
x
CLK
T
x
DIR
COUNT
xx
+ 1
x
+ 2
x
+ 3
x
+ 4
x
+ 5
x
+ 6
x
+ 5
x
+ 4
x
+ 3
x
+ 2
x
+ 1
A0269-02
PH2
CLKOUT