English
Language : 

UPSD3422_06 Datasheet, PDF (90/293 Pages) STMicroelectronics – Turbo Plus Series Fast Turbo 8032 MCU with USB and Programmable Logic
Standard 8032 timer/counters
uPSD34xx
turned on and off by switching it out of and into its own Mode 3, or can still be used by the
serial port as a baud rate generator, or in fact, in any application not requiring an interrupt.
Table 42.
Bit 7
GATE
TMOD: Timer mode register (SFR 89h, reset value 00h)
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
C/T
M[1:0]
GATE
C/T
M[1:0]
Bit
Symbol R/W
Timer Definition (T/C is abbreviation for Timer/Counter)
7
GATE
R,W
Gate control.
When GATE = 1, T/C is enabled only while pin
EXTINT1 is '1' and the flag TR1 is '1.' When GATE = 0,
T/C is enabled whenever the flag TR1 is '1.'
Counter or Timer function select.
6
C/T
R,W
When C/T = 0, function is timer, clocked by internal
clock. C/T = 1, function is counter, clocked by signal
sampled on external pin, C1.
Timer 1
Mode Select.
00b = 13-bit T/C. 8 bits in TH1 with TL1 as 5-bit pre-
scaler.
[5:4]
M[1:0]
R,W
01b = 16-bit T/C. TH1 and TL1 are cascaded. No pre-
scaler.
10b = 8-bit auto-reload T/C. TH1 holds a constant and
loads into TL1 upon overflow.
11b = Timer Counter 1 is stopped.
3
GATE
R,W
Gate control.
When GATE = 1, T/C is enabled only while pin
EXTINT0 is '1' and the flag TR0 is '1.' When GATE = 0,
T/C is enabled whenever the flag TR0 is '1.'
2
C/T
R,W
Counter or Timer function select.
When C/T = 0, function is timer, clocked by internal
clock. C/T = 1, function is counter, clocked by signal
sampled on external pin, C0.
Timer 0 Mode Select.
00b = 13-bit T/C. 8 bits in TH0 with TL0 as 5-bit pre-
scaler.
[1:0]
M[1:0]
R,W
01b = 16-bit T/C. TH0 and TL0 are cascaded. No pre-
scaler.
10b = 8-bit auto-reload T/C. TH0 holds a constant and
loads into TL0 upon overflow.
11b = TL0 is 8-bit T/C controlled by standard Timer 0
control bits. TH0 is a separate 8-bit timer that uses
Timer 1 control bits.
90/293