Specifications

54
3706C–MICRO–2/11
AT89LP3240/6440
Mode 3 is for applications requiring an extra 8-bit timer or counter. With Timer 0 in Mode 3, the
AT89LP3240/6440 can appear to ha ve four Timer/Counters. When Timer 0 is in Mode 3, Timer
1 can be turned on and off by switching it out of and into its own Mode 3. In this case, Timer 1
can still be used by the serial port as a baud rate generator or in a ny application not requiring an
interrupt.
Figure 11-4. Timer/Counter 0 Mode 3: Two 8-bit Counters
Note: RH0/RL0 are not required by Timer 0 during Mode 3 and may be used as temporary storage
registers.
.
Control
Interrupt
Control
Interrupt
(8 Bits)
(8 Bits)
C/T = 0
C/T =1
T0 Pin
GATE0
INT0 Pin
÷TPS
÷TPS
Table 11-2. TCON – Timer/Counter Control Register
TCON = 88H Reset Value = 0000 0000B
Bit Addressable
TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0
Bit76543210
Symbol Function
TF1
Timer 1 overflow flag. Set by hardware on Timer/Counter overflow. Cleared by hardware when the processor vectors
to interrupt routine.
TR1 Timer 1 run control bit. Set/cleared by software to turn Timer/Counter on/off.
TF0
Timer 0 overflow flag. Set by hardware on Timer/Counter overflow. Cleared by hardware when the processor vectors
to interrupt routine.
TR0 Timer 0 run control bit. Set/cleared by software to turn Timer/Counter on/off.
IE1 Interrupt 1 edge flag. Set by hardware when external interrupt edge detected. Cleared when interrupt processed.
IT1 Interrupt 1 type control bit. Set/cleared by software to specify falling edge/low level triggered external interrupts.
IE0 Interrupt 0 edge flag. Set by hardware when external interrupt edge detected. Cleared when interrupt processed.
IT0 Interrupt 0 type control bit. Set/cleared by software to specify falling edge/low level triggered external interrupts.