English
Language : 

71M6545 Datasheet, PDF (39/134 Pages) Maxim Integrated Products – Four-Quadrant Metering, Phase Metrology Processors Flash/RAM Size
PDS_6545_009
Data Sheet 71M6545/H
1
0
Mode 2 8-bit auto-reload Counter/Timer. The reload value is kept in TH0 or
TH1, while TL0 or TL1 is incremented every machine cycle. When
TL(x) overflows, a value from TH(x) is copied to TL(x) (where x is 0 for
counter/timer 0 or 1 for counter/timer 1.
1
1
Mode 3 If Timer 1 M1 and M0 bits are set to 1, Timer 1 stops.
If Timer 0 M1 and M0 bits are set to 1, Timer 0 acts as two independent
8-bit Timer/Counters.
In Mode 3, TL0 is affected by TR0 and gate control bits, and sets the TF0 flag on overflow, while TH0
is affected by the TR1 bit, and the TF1 flag is set on overflow. Table 21 specifies the combinations of
operation modes allowed for Timer 0 and Timer 1.
Table 21: Allowed Timer/Counter Mode Combinations
Timer 1
Mode 0
Mode 1
Mode 2
Timer 0 - mode 0
Yes
Yes
Yes
Timer 0 - mode 1
Yes
Yes
Yes
Timer 0 - mode 2
Not allowed Not allowed
Yes
Table 22: TMOD Register Bit Description (SFR 0x89)
Bit
Symbol
Timer/Counter 0:
TMOD[7] Gate
TMOD[6] C/T
TMOD[5:4] M1:M0
Timer/Counter 1
TMOD[3] Gate
TMOD[2] C/T
TMOD[1:0] M1:M0
Function
If TMOD[7] is set, external input signal control is enabled for Counter 0. The
TR0 bit in the TCON register (SFR 0x88) must also be set in order for Counter
0 to increment. With these settings, Counter 0 increments on every falling
edge of the logic signal applied to one or more of the DIO2-11 pins, as
specified by the contents of the DIO_R2 through DIO_R11 registers. See
Table 47.
Selects timer or counter operation. When set to 1, a counter operation is
performed. When cleared to 0, the corresponding register functions as a timer.
Selects the mode for Timer/Counter 0 as shown in Table 20.
If TMOD[3] is set, external input signal control is enabled for Counter 1.
The TR1 bit in the TCON register (SFR 0x88) must also be set in order for
Counter 1 to increment. With these settings, Counter 1 increments on every
falling edge of the logic signal applied to one or more of the DIO2-11 pins,
as specified by the contents of the DIO_R2 through DIO_R11 registers. See
Table 47.
Selects timer or counter operation. When set to 1, a counter operation is
performed. When cleared to 0, the corresponding register functions as a
timer.
Selects the mode for Timer/Counter 1, as shown in Table 20.
Bit
TCON[7]
TCON[6]
TCON[5]
v1.0
Table 23: The TCON Register Bit Functions (SFR 0x88)
Symbol
TF1
TR1
TF0
Function
The Timer 1 overflow flag is set by hardware when Timer 1 overflows.
This flag can be cleared by software and is automatically cleared when an
interrupt is processed.
Timer 1 run control bit. If cleared, Timer 1 stops.
Timer 0 overflow flag set by hardware when Timer 0 overflows. This flag
can be cleared by software and is automatically cleared when an interrupt
is processed.
© 2008–2011 Teridian Semiconductor Corporation
39