Fig. 2.28 External Cock Mode Operation Description Diagram; Fig. 2.29 Operation Diagram When Timer Stop Bit Is Used - Fujitsu MB89140 Series Hardware Manual

Table of Contents

Advertisement

8/16-BIT TIMER
(TIMER 2 AND TIMER 3)
External clock
Counter clear
TSTR = 1
Count value
Undefined
T2DR
T2IF

Fig. 2.28 External Cock Mode Operation Description Diagram

CK
CK'
T2STP
T2STR
T2STR'
Count value

Fig. 2.29 Operation Diagram when Timer Stop Bit is Used

HARDWARE CONFIGURATION
(2) 8-bit external clock mode
In the 8-bit external clock mode, the eternal clock input can be selected
three various external clock inputs by setting the clock source select bits
(T2CS1 and T2CS0) of the timer 2 control register (T2CR). The external-
clock input pin of the timer corresponds to P33/EC.
To start the timer, write 1 at the timer start bit (T2STR) of the T2CR to clear
the counter.
When the value of the counter agrees with that of the timer data register, the
interval interrupt request flag bit (T2IF) is set to 1. At this time, if an interrupt
is enabled (T2IE = 1), an interrupt request is output to the CPU.
00
00
01
02
H
H
H
FF
(4) Precautions for use of timer stop bit
If the timer stop bit is used to stop the timer, the input clock pulse is fixed to
HIGH, Therefore, the count value varies depending on the level of the input
clock pulse.
After using the timer stop bit to stop the timer, if 00 is written simultaneously
at the timer stop and start bits, the count value may be incremented by one.
Therefore, when using the timer stop bit to stop the timer, read the count
data and then write 0 at the timer start bit (Figure 2.29)
When input clock is High
2-53
FE
H
H
When input clock is Low
FF
00
01
H
H
H
FF
H
T2IF = 0 (W)

Advertisement

Table of Contents
loading

Table of Contents