English
Language : 

GMS81C7216 Datasheet, PDF (52/121 Pages) List of Unclassifed Manufacturers – 8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C7208/7216
8-bit Event Counter Mode
In this mode, counting up is started by an external trigger. This
trigger means rising edge of the EC0 or EC2 pin input. Source
clock is used as an internal clock selected with timer mode regis-
ter TM0, TM1, TM2 or TM3. The contents of timer data register
TDRn (n = 0,1,2,3,........,FF) are compared with the contents of
the up-counter Tn. If a match is found, an timer interrupt request
flag TnIF is generated, and the counter is cleared to “0”. The
counter is restart and count up continuously by every rising edge
of the ECn pin input.
The maximum frequency applied to the ECn pin is fXIN/2 [Hz].
In order to use event counter function, the bit 3, 4 of the Port
Mode Register PMR (address 0D9H) is required to be set to “1”.
Start count
ECn pin input
Up-counter
TDR1
T1IF interrupt
0
1
2
n
After reset, the value of timer data register TDRn is undefined, it
should be initialized to between 01H~FFH, not to "0". The inter-
val period of Timer is calculated as below equation.
Period (sec) = ----1----- × 2 × Divide Ratio × TDRn
fXIN
n-1 n 0
1
2
Figure 13-7 Event Counter Mode Timing Chart
TDR1
Timer 1 (T1IF)
Interrupt
T1ST
Start & Stop
T1CN
Control count
clear & start
stop
~~
disable enable
~~
up-count
Occur interrupt
Occur interrupt
T1ST = 1
T1ST = 0
T1CN = 0
T1CN = 1
Figure 13-8 Count Operation of Timer / Event Counter
TIME
48
FEB. 2005 Ver 1.04