8XC196MC, MD, MH USER’S MANUAL

EPAx_CON

EPAx_CON

x = 0–1 (8XC196MH) x = 0–3 (8XC196MC) x = 0–5 (8XC196MD)

Address: Table C-4 Reset State:

The EPA control (EPAx_CON) registers control the functions of their assigned capture/compare channels.

x = 0, 2, 4

7

TB

CE

M1

M0

 

 

 

 

0

RE

WGR

ROT

ON/RT

 

 

 

 

7

0

x = 1, 3, 5

TB

CE

M1

M0

RE

AD

ROT

ON/RT

Bit

Bit

 

 

Function

Number

Mnemonic

 

 

 

 

 

 

 

 

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 (reloading the waveform generator; starting 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.

 

 

When a capture event (falling edge, rising edge, or an edge change on

 

 

the EPAx pin) occurs, the reference timer value is saved in the EPA event-

 

 

time register (EPAx_TIME).

 

 

 

 

6

CE

Compare Enable

 

 

 

Determines whether the EPA channel operates in capture or compare

 

 

mode.

 

 

 

 

0 = capture mode

 

 

1 = compare mode

 

 

 

5:4

M1:0

EPA Mode Select

 

 

In capture mode, specifies the type of event that triggers an input capture.

 

 

In compare mode, specifies the action that the EPA executes when the

 

 

reference timer matches the event time.

 

 

M1

M0

Capture Mode Event

 

 

0

0

no capture

 

 

0

1

capture on falling edge

 

 

1

0

capture on rising edge

 

 

1

1

capture on either edge

 

 

M1

M0

Compare Mode Action

 

 

0

0

no output

 

 

0

1

clear output pin

 

 

1

0

set output pin

 

 

1

1

toggle output pin

 

 

 

 

 

C-18

Page 495
Image 495
Intel manual EPAxCON = 0-1 8XC196MH x = 0-3 8XC196MC x = 0-5 8XC196MD