Mitsubishi DS907x SIP User Manual page 107

Mitsubishi microcontroller user's guide
Table of Contents

Advertisement

Mode 0
Figure 13–3 is a block diagram of a timer/counter oper-
ating in Mode 0. Mode 0 configures either program-
mable timer for operation as a 13–bit timer/counter. For
Timer 0, selection of Mode 0 configures bit 4 – 0 of TL0
as bits 4 – 0 respectively of the 13–bit timer/counter reg-
ister. In addition, bits 7 – 0 of TH0 are configured as bits
12 – 5 respectively of the 13–bit timer/counter register.
Bits 7 – 5 of TL0 are indeterminate and should be ig-
nored when read. All of the timer/counter bits are
cleared to 0 by a hardware reset. When the TR0 bit is set
with either GATE=0 or INT0=1, the 13–bit register will be
incremented as each count is received. The previous
TIMER/COUNTER MODE 0 AND 1 OPERATION Figure 13–3
7
T0 PIN
OSC.
TF0
0
TH0
0 IF MODE 0
1 IF MODE 1
DIVIDE
BY 12
1 IF C/T = 1
0 IF C/T = 0
GATE
INT0 PIN
value of the 13–bit register is unchanged when the TR0
bit is set to a 1 from a previous 0 condition.
When the 13–bit timer/counter reaches a value of
1FFFH (all 1's) the next count received will cause the
value to roll over to 0000 and the TF0 flag will be set. Ad-
ditionally, an interrupt will be generated if it had been en-
abled.
Mode 0 operation for Timer 1 is functionally identical to
that described for Timer 0. TH1 and TL1 are used to
form the 13–bit register as just described for Timer 0.
Likewise, TR1, TF1, and INT1 perform the functions de-
scribed for TR0, TF0, and INT0.
INTERRUPT
1
7
0
Ï Ï
Ï Ï
Ï Ï
Ï Ï
Ï Ï
Ï Ï
TL0
INVALID WHEN READ IN MODE 0
1
0
TR0
107
0
NOTE: FOR TIMER 1 OPERATION
TF0
TF1
TH0
TH1
TL0
TL1
T0
T1
TR0
TR1
INT0
INT1
USER'S GUIDE
050396 106/173

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ds5000tkDs5000fpDs5001fpDs5002fp

Table of Contents