Fujitsu MB89202 Computer Hardware User Manual


 
190
CHAPTER 8 8/16-BIT CAPTURE TIMER/COUNTER
Detection of the number of events
In the external clock mode, counter clear can be prohibited by the compare match counter clear mask bit
(TCMSK) of the capture control register (TCCR) when a match is detected. Setting the compare match
counter clear mask bit to "1" enables the event count detection function to be used. In this case, a compare
match does not cause data to be re-loaded to the compare latch. To update the compare latch value, stop
and restart the timer.
Figure 8.7-2 shows counter function operation in the external clock mode in which TCMSK is used.
Figure 8.7-2 Counter Function Operation in External Clock Mode
00
H
01
H
02
H
03
H
7E
H
7F
H
00
H
01
H
00
7F
00
H
01
H
02
H
03
H
7E
H
7F
H
80
H
81
H
00
TFCR0=1 (W)
7F
H
7F
H
FF
H
55
H
FF
H
EC
TSTR0=1
TDR0
TCMSK=0
Compare latch
Counter clear
Counter value
Un-
defined
Un-
defined
Compare latch
Counter clear
Counter value
TIF0
TCMSK=1