REGISTERS

COMPx_CON

COMPx_CON

Address:

Table C-3

x = 0–3 (8XC196MC, MH)

Reset State:

 

x = 0–5 (8XC196MD)

 

 

The EPA compare control (COMPx_CON) registers determine the function of the EPA compare channels.

x = 0, 2, 4

x = 1, 3, 5

7

TB

CE

M1

M0

7

 

 

 

 

 

 

 

TB

CE

M1

M0

 

 

 

 

0

RE

WGR

ROT

RT

 

 

 

0

 

 

 

 

RE

AD

ROT

RT

 

 

 

 

7

TB

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.

 

 

 

6

CE

Compare Enable

 

 

This bit enables the compare function.

 

 

0

= compare function disabled

 

 

1

= compare function enabled

 

 

 

5:4

M1:0

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

 

 

 

 

3

RE

Re-enable

 

 

 

Allows a compare event to continue to execute each time the event-time

 

 

register (COMPx_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

 

 

 

 

 

 

C-15

Page 492
Image 492
Intel 8XC196MD, 8XC196MH manual COMPxCON, Comp xCON Address Table C-3 = 0-3 8XC196MC, MH