Specifications

55
3706C–MICRO–2/11
AT89LP3240/6440
Table 11-3. TMOD – Timer/Counter Mode Control Register
TMOD Address = 089H Reset Value = 0000 0000B
Not Bit Addressable
GATE1 C/T1
T1M1 T1M0 GATE0 C/T0 T0M0 T0M1
Bit76543210
Symbol Function
GATE1
Timer 1 Gating Control. When set, Timer/Counter 1 is enabled only while INT1
pin is high and TR1 control pin is set.
When cleared, Timer 1 is enabled whenever TR1 control bit isset.
C/T1
Timer or Counter Selector 1. Cleared for Timer operation (input from internal system clock). Set for Counter operation
(input from T1 input pin). C/T1 must be zero when using Timer 1 in PWM mode.
T1M1
T1M0
Timer 1 Operating Mode
Mode T1M1 T1M0 Operation
000Variable 9–16-bit Timer Mode. 8-bit Timer/Counter TH1 with TL1 as 1–8-bit prescaler.
101
16-bit Auto-Reload Mode. TH1 and TL1 are cascaded to form a 16-bit Timer/Counter
that is reloaded with RH1 and RL1 each time it overflows.
210
8-bit Auto Reload Mode. TH1 holds a value which is reloaded into 8-bit Timer/Counter
TL1 each time it overflows.
311Timer/Counter 1 is stopped
GATE0
Timer 0 Gating Control. When
set, Timer/Counter 0 is enabled only while INT0 pin is high and TR0 control pin is set.
When cleared, Timer 0 is enabled whenever TR0 control bit isset.
C/T0
Timer or Counter Selector 0. Cleared for Timer operation (input from internal system clock). Set for Counter operation
(input from T0 input pin). C/T0 must be zero when using Timer 0 in PWM mode.
T0M1
T0M0
Timer 0 Operating Mode
Mode T0M1 T0M0 Operation
000Variable 9–16-bit Timer Mode. 8-bit Timer/Counter TH0 with TL0 as 1–8-bit prescaler.
101
16-bit Auto-Reload Mode. TH0 and TL0 are cascaded to form a 16-bit Timer/Counter
that is reloaded with RH0 and RL0 each time it overflows.
210
8-bit Auto Reload Mode. TH0 holds a value which is reloaded into 8-bit Timer/Counter
TL0 each time it overflows.
311
Split Timer Mode. TL0 is an 8-bit Timer/Co
unter controlled by the standard Timer 0
control bits. TH0 is an 8-bit timer only controlled by Timer 1 control bits.