Programming The Compare-Only Channels - Intel 8XC196MC User Manual

Table of Contents

Advertisement

8XC196MC, MD, MH USER'S MANUAL

11.5.4 Programming the Compare-only Channels

To program a compare event, you must first write to the COMPx_CON register (Figure 11-11) to
configure the compare-only channel and then load the event time into COMPx_TIME.
COMPx_CON has the same bits and settings as EPAx_CON. COMPx_TIME is functionally iden-
tical to EPAx_TIME.
COMP x _CON
x = 0–3 (8XC196MC, MH)
x = 0–5 (8XC196MD)
The EPA compare control (COMP x _CON) registers determine the function of the EPA compare
channels.
7
x = 0, 2, 4
TB
7
x = 1, 3, 5
TB
7
TB
6
CE
5:4
M1:0
3
RE
Figure 11-11. EPA Compare Control (COMP x _CON) Registers
11-22
CE
M1
M0
CE
M1
M0
Time Base Select
Specifies the reference timer.
0 = timer 1 is the reference timer and timer 2 is the opposite timer
1 = timer 2 is the reference timer and timer 1 is the opposite timer
A compare event (start of an A/D conversion; clearing, setting, or toggling
an output pin; and/or resetting either timer) occurs when the reference
timer matches the time programmed in the event-time register.
Compare Enable
This bit enables the compare function.
0 = compare function disabled
1 = compare function enabled
EPA Mode Select
Specifies the type of compare event.
M1
M0
0
0
no output
0
1
clear output pin
1
0
set output pin
1
1
toggle output pin
Re-enable
Allows a compare event to continue to execute each time the event-time
register (COMP x _TIME) matches the reference timer rather than only
upon the first time match.
0 = compare function will drive the output only once
1 = compare function always enabled
Get other manuals https://www.bkmanuals.com
See Table 11-3 on
Address:
Reset State:
RE
WGR
ROT
RE
AD
ROT
page 11-3
00H
0
RT
0
RT

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents