beautypg.com

Figure 22 – Rainbow Electronics T89C5115 User Manual

Page 49

background image

49

T89C5115

4128A–8051–04/02

Mode 0 (13-bit Timer)

Mode 0 configures Timer 0 as an 13-bit Timer which is set up as an 8-bit Timer (TH0
register) with a modulo 32 prescaler implemented with the lower five bits of TL0 register
(see Figure 22). The upper three bits of TL0 register are indeterminate and should be
ignored. Prescaler overflow increments TH0 register.

Figure 22. Timer/Counter x (x= 0 or 1) in Mode 0

Mode 1 (16-bit Timer)

Mode 1 configures Timer 0 as a 16-bit Timer with TH0 and TL0 registers connected in
cascade (see Figure 23). The selected input increments TL0 register.

Figure 23. Timer/Counter x (x= 0 or 1) in Mode 1

FTx

CLOCK

TRx

TCON reg

TFx

TCON reg

0

1

GATEx

TMOD reg

÷

6

Overflow

Timer x
Interrupt
Request

C/Tx#

TMOD reg

TLx

(5 bits)

THx

(8 bits)

INTx#

Tx

see the “Clock” section

TRx

TCON reg

TFx

TCON reg

0

1

GATEx

TMOD reg

Overflow

Timer x
Interrupt
Request

C/Tx#

TMOD reg

TLx

(8 bits)

THx

(8 bits)

INTx#

Tx

FTx

CLOCK

÷

6

see the “Clock” section