beautypg.com

7 compare register and capture register operations – NEC PD78214 User Manual

Page 205

background image

176

µ

PD78214 Sub-Series

7.3.7 Compare Register and Capture Register Operations

(1) Compare operation

Eight-bit timer/counter 2 performs an operation to compare the values set in the compare registers with timer
count values.

When the values set in the compare registers (CR20, CR21) coincide with count values of 8-bit timer 2 (TM2),
the coincidence signal is sent to the output control circuit. At the same time, the interrupt requests (INTC20,
INTC21) are generated.

After the value of the CR21 register coincides with a count value of TM2, the count value of TM2 can be cleared.
Thus, 8-bit timer/counter 2 can operate as an interval timer for repeatedly counting up to the value set in the
CR21 register.

Fig. 7-80 Compare Operation

Remark CLR21 = 0, CLR22 = 0

CE2

←1

OVF2

TM2
count value

Count starts

Value of CR21

Value of CR20

Value of CR20

Value of CR21

Coincidence

Coincidence

Coincidence

FFH

FFH

INTC20

interrupt request

0H

INTC21

interrupt request

TO2 pin output

ENTO2=1

ALV2=1

TO3 pin output

ENTO2=1

ALV3=0

Inactive level

Cleared by software

Inactive level

Coincidence

(

(

(

(

This manual is related to the following products: