English
Language : 

UPD784938 Datasheet, PDF (325/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 11 TIMER/EVENT COUNTER 2
11.7 Compare Register, Capture/Compare Register, and Capture Register Operation
11.7.1 Compare operations
Timer/event counter 2 performs compare operations in which the value set in the compare register (CR20) and the
capture/compare register (CR21) specified for compare operation is compared with the timer counter 2 (TM2) count value.
If the count value of TM2 matches the preset value of the CR20, and CR21 when a compare operation is performed,
as the result of the count operation, a match signal is sent to the output control circuit, and an interrupt request signal
(INTC20/INTC21) is generated at the same time.
After a match with the CR20 or CR21 value, the TM2 contents can be cleared, and the timer functions as an interval
timer that repeatedly counts up to the value set in the CR20 or CR21.
Figure 11-15. Compare Operation in 8-Bit Operation Mode
FFH
FFH
TM2
count value
CR21 value
CR20 value
0H
Count start
CE2 ← 1
Match
INTC20
interrupt request
Match
INTC21
interrupt request
TO2 pin output
ENTO2 = 1
ALV2 = 1 Inactive level
TO3 pin output
ENTO2 = 1 Inactive level
ALV3 = 0
OVF2
Remark CLR21 = 0, CLR22 = 0, BW2 = 0
CR21 value
CR20 value
Match
Match
Cleared by software
Preliminary User’s Manual U13987EJ1V0UM00
325