Mode 3 – Mitsubishi Motors DS5000TK User Manual

Page 109

Advertising
background image

USER’S GUIDE

050396 108/173

109

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 t

CLK

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 t

CLK

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 t

CLK

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

MUX

GATE

INT0 PIN

OSC.

DIVIDE
BY 12

TR0

TR1

TH0

TL0

7

0

7

0

TF1

TF0

INTERRUPT

INTERRUPT

T0 PIN

1 IF C/T = 1
0 IF C/T = 0

0

1

Advertising
This manual is related to the following products: