English
Language : 

UPD780828A Datasheet, PDF (143/472 Pages) NEC – 8-bit Single-Chip Microcontroller
Chapter 7 8-Bit Timer/Event Counters 50 and 51
7.4.2 External event counter operation
The external event counter counts the number of external clock pulses to be input to the
TI50/P34/522/TO50 and TI51/521/522/TO51 pins with 8-bit timer registers 50 and 51 (TM50 and
TM51).
TM50 and TM51 are incremented each time the valid edge specified with timer clock select registers 50
and 51 (TCL50 and TCL51) is input. Either rising or falling edge can be selected.
When the TM50 and TM51 counted values match the values of 8-bit compare registers (CR50 and
CR51), TM50 and TM51 are cleared to 0 and the interrupt request signals (INTTM50 and INTTM51) are
generated.
Figure 7-12: 8-Bit Timer Mode Control Register Setting for External Event Counter Operation
TCEn TMCn6
TMCn4 LVSn LVRn TMCn1 TOEn
TMCn 1
0
0
0
x
x
x
0
TOn output disable
Clear & start mode on match of TMn and CRn
TMn operation enable
Remarks: 1. n = 50, 51
2. x: don’t care
Figure 7-13: External Event Counter Operation Timings (with Rising Edge Specified)
Count Clock
TMn Count Value
00
01 02 13 04 05
N-1 N 00 01 02 03
CRn
N
TCEn
INTTMn
Remarks: 1. N = 00H to FFH
2. n = 50, 51
User’s Manual U16504EE1V1UD00
143