Programming The Capture/Compare Channels - Intel 8XC196MC User Manual

Table of Contents

Advertisement

8XC196MC, MD, MH USER'S MANUAL

11.5.3 Programming the Capture/Compare Channels

The EPAx_CON register controls the function of its assigned capture/compare channel. The reg-
isters are identical with the exception of bit 2. For EPA channels 0, 2, and 4, setting this bit enables
an EPA event to cause a waveform generator reload. For EPA channels 1, 3, and 5, setting this bit
enables an EPA event to cause an A/D conversion. To program a compare event, always write to
EPAx_CON (Figure 11-10) first to configure the EPA capture/compare channel, and then load the
event time into EPAx_TIME. To program a capture event, you need only write to EPAx_CON.
Table 11-6 shows the effects of various combinations of EPAx_CON bit settings for channels 1,
3, or 5.
Table 11-6. Example EPA Control Register Settings for Channels 1, 3, or 5
TB
CE
MODE
7
6
5
4
X
0
0
0
X
0
0
1
X
0
1
0
X
0
1
1
X
0
X
1
X
0
1
X
X
0
0
1
X
0
1
0
TB
CE
MODE
7
6
5
4
X
1
0
0
X
1
0
0
X
1
0
1
X
1
1
0
X
1
1
1
X
1
X
X
X
1
X
X
X
1
X
X
NOTES:
1.
— = bit is not used
2.
X = bit may be used, but has no effect on the described operation. These bits cause other operations
to occur.
11-18
Capture Mode
WGR
RE
ROT
ON/RT
/AD
3
2
1
X
X
X
X
X
X
X
1
X
1
1
X
1
X
Compare Mode
WGR
RE
ROT
ON/RT
/AD
3
2
1
X
X
0
X
X
X
X
X
X
X
X
X
X
X
X
0
X
X
1
X
1
X
Get other manuals https://www.bkmanuals.com
0
0
None
X
Capture on falling edges
X
Capture on rising edges
X
Capture on both edges
X
Capture on falling edge and reset opposite timer
X
Capture on rising edge and reset opposite timer
X
Start A/D conversion (EPA1, 3, 5) or reload
waveform generator (EPA0, 2, 4) on falling edge
X
Start A/D conversion (EPA1, 3, 5) or reload
waveform generator (EPA0, 2, 4) on rising edge
0
0
None
0
Generate interrupt only (software timer)
X
Clear output pin
X
Set output pin
X
Toggle output pin
1
Reset reference timer
1
Reset opposite timer
X
Start A/D conversion (EPA1, 3, 5) or reload
waveform generator (EPA0, 2, 4)
Operation
Operation

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents