User`s guide

Enhanced Timers LZ87010 Advance User’s Guide
8-14 1/15/03
8.3 Enhanced Timer Registers
8.3.1 T2CAP and T3CAP (Capture Control) Registers
The two capture control registers, T2CAP and T3CAP, set the operating mode of the Timer
2 and Timer 3 capture units. Both timers have two capture units. These registers select the
active edge (rising, falling, both, or none) on the external capture input signal that triggers
a capture operation, and selects whether a capture will also generate an interrupt.
Table 8-5. T2CAP Register
BIT 7 6 5 4 3 2 1 0
FIELD /// /// IIE1 IIE0 IDE1[1] IDE1[0] IDE0[1] IDE0[0]
RESET 0000 0 000
RW RW RW RW RW RW RW RW RW
ADDR 0xD9
Table 8-6. T3CAP Register
BIT 7 6 5 4 3 2 1 0
FIELD /// /// IIE1 IIE0 IED1[1] IDE1[0] IED0[1] IDE0[0]
RESET 00000000
RW RW RW RW RW RW RW RW RW
ADDR 0xE9
Table 8-7. T2CAP and T3CAP Register Bits
BIT NAME DESCRIPTION
7:6 /// Reserved Reads ‘0’, write ‘0’.
5 IIE1
Interrupt Enable for Capture 1 If ‘1’, interrupts are generated on capture
complete. If ‘0’, no interrupt is generated
4 IIE0
Interrupt Enable for Capture 0 If ‘1’, interrupts are generated on capture
complete. If ‘0’, no interrupt is generated
3:2 IED1[1:0]
Input Edge Select for Capture 1 Detects which edge will trigger data cap-
ture. Choices are: rising edge, falling edge, both edge, neither edge (disable
capture). The capture input for the Capture 1 channel is CTCAP2B for Timer 2,
and CTCAP3B for Timer 3.
00 = Capture input is ignored
01 = Rising edge
10 = Falling edge
11 = Both edges
1:0 IED0[1:0]
Input Edge Select for Capture 0 Detects which edge will trigger data cap-
ture. Choices are: rising edge, falling edge, both edge, neither edge (disable
capture). The capture input for the Capture 1 channel is CTCAP2A for Timer 2,
and CTCAP3A for Timer 3.
00 = Capture input is ignored
01 = Rising edge
10 = Falling edge
11 = Both edges