Compare Register And Capture Register Operation; Compare Operations - NEC uPD784038 Series User Manual

16-bit single-chip microcontrollers
Table of Contents

Advertisement

8.6 COMPARE REGISTER AND CAPTURE REGISTER OPERATION

8.6.1 Compare Operations

Timer/counter 0 performs compare operations in which the value set in compare registers (CR00, CR01) are compared with
the timer register 0 (TM0) count value.
If the count value of TM0 matches the preset CR0n (n = 0, 1) value as the result of the count operation, a match signal is sent
to the output control circuit, and at the same time an interrupt request (INTC00/INTC01) is generated.
After a match with the CR01 value, the TM0 count value can be cleared, and the timer functions as an interval timer that
repeatedly counts up to the value set in the CR01.
TM0
Count Value
0H
Count Start
CE0 ← 1
INTC00
Interrupt Request
INTC01
Interrupt Request
OVF0
Remark CLR01 = 0
CHAPTER 8 TIMER/COUNTER 0
Figure 8-13 Compare Operation
CR01 Value
CR00 Value
Match
Match
User's Manual U11316EJ4V1UD
FFFFH
CR01 Value
CR00 Value
Match
Cleared by Software
FFFFH
Match
205

Advertisement

Table of Contents
loading

Table of Contents