USER'S GUIDE

Mode 3

When Timer 0 is selected for operation in Mode 3, both TH0 and TL0 are configured independently as an 8±bit timer/counter and as an 8±bit timer. Figure 13±5 illus- trates the function of Timer 0 for Mode 3 operation.

For Timer 0 in Mode 3, TL0 becomes an 8±bit timer/ counter which is controlled by the Timer 0 control bits (TR0 and TF0) in the TMOD and TCON registers. TL0's count input may be assigned to either the 12 tCLK signal

or to the external T0 pin via C/T for Timer 0. In addition,

the count input may be gated as a function of the INT0 pin using Timer 0's GATE bit in TMOD.

TH0 becomes an 8±bit timer when Mode 3 is selected for Timer 0. TH0's input can only be the 12 tCLK signal.

TR1 and TF1 are assigned for use with TH0 as is the in- terrupt for Timer 1, which will be generated when TH0 overflows from all 1's.

When Timer 1 is selected for operation in Mode 3, it stops counting and holds its current value. This action is the same as setting TR1=0. When Timer 0 is selected in Mode 3, Timer 1's control bits are stolen as described above. As a result, Timer 1's functions are limited in this MODE. It is forced to operate as a timer whose clock in-

put is 12 tCLK and it cannot generate an interrupt on overflow. In addition, it also cannot be used with the

GATE function. However, it can be started and stopped by switching it into or out of Mode 3 or it can be assigned as a baud rate generator for the serial port.

TIMER 0 MODE 3 OPERATION Figure 13±5

TF1 INTERRUPT

7

0

TH0

TR1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OSC.

 

DIVIDE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BY 12

 

 

 

 

 

TR0

 

 

 

 

 

 

 

 

 

GATE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INT0 PIN

 

7

0

1

T0 PIN

1 IF C/T = 1

0 IF C/T = 0

INTERRUPT

TF0

0

TL0

MUX

050396 108/173

109

Page 109
Image 109
Mitsubishi DS5000TK, DS907x SIP manual Timer 0 Mode 3 Operation ±5, 109