UM10346_1
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 01 — 2 November 2009
43 of 132
NXP Semiconductors
UM10346
LPC980/982 User manual
7.1 Mode 0
Putting either Timer into Mode 0 makes it look like an 8048 Timer, which is an 8-bit
Counter with a divide-by-32 prescaler.
shows Mode 0 operation.
Table 31.
Timer/Counter Mode register (TMOD - address 89h) bit description
Bit Symbol
Description
0
T0M0
Mode Select for Timer 0. These bits are used with the T0M2 bit in the TAMOD register to determine the
Timer 0 mode (see
).
1
T0M1
2
T0C/T
Timer or Counter selector for Timer 0. Cleared for Timer operation (input from CCLK). Set for Counter
operation (input from T0 input pin).
3
T0GATE Gating control for Timer 0. When set, Timer/Counter is enabled only while the INT0 pin is high and the TR0
control pin is set. When cleared, Timer 0 is enabled when the TR0 control bit is set.
4
T1M0
Mode Select for Timer 1. These bits are used with the T1M2 bit in the TAMOD register to determine the
Timer 1 mode (see
).
5
T1M1
6
T1C/T
Timer or Counter Selector for Timer 1. Cleared for Timer operation (input from CCLK). Set for Counter
operation (input from T1 input pin).
7
T1GATE Gating control for Timer 1. When set, Timer/Counter is enabled only while the INT1 pin is high and the TR1
control pin is set. When cleared, Timer 1 is enabled when the TR1 control bit is set.
Table 32.
Timer/Counter Auxiliary Mode register (TAMOD - address 8Fh) bit allocation
Bit
7
6
5
4
3
2
1
0
Symbol
--
-
-
T1M2
-
-
-
T0M2
Reset
x
x
x
0
x
x
x
0
Table 33.
Timer/Counter Auxiliary Mode register (TAMOD - address 8Fh) bit description
Bit Symbol
Description
0
T0M2
Mode Select for Timer 0. These bits are used with the T0M2 bit in the TAMOD register to determine the
Timer 0 mode (see
1:3 - reserved
4
T1M2
Mode Select for Timer 1. These bits are used with the T1M2 bit in the TAMOD register to determine the
Timer 1 mode (see
The following timer modes are selected by timer mode bits TnM[2:0]:
000 —
8048 Timer ‘TLn’ serves as 5-bit prescaler. (Mode 0)
001 —
16-bit Timer/Counter ‘THn’ and ‘TLn’ are cascaded; there is no prescaler.(Mode 1)
010 —
8-bit auto-reload Timer/Counter. THn holds a value which is loaded into TLn when it overflows.
(Mode 2)
011 —
Timer 0 is a dual 8-bit Timer/Counter in this mode. TL0 is an 8-bit Timer/Counter controlled by the
standard Timer 0 control bits. TH0 is an 8-bit timer only, controlled by the Timer 1 control bits (see text).
Timer 1 in this mode is stopped. (Mode 3)
100 —
Reserved. User must not configure to this mode.
101 —
Reserved. User must not configure to this mode.
110 —
PWM mode (see
111 —
Reserved. User must not configure to this mode.
5:7 -
reserved