Specifications
74
3706C–MICRO–2/11
AT89LP3240/6440
Notes: 1. All writes/reads to/from T2CCC will access channel X as currently selected by T2CCA.The control registers for the remain-
ing unselected channels are not accessible.
2. Analog Comparator A events are determined by the CMA
2-0
bits in ACSRA. See Table 19-1 on page 130.
3. Analog Comparator B events are determined by the CMB
2-0
bits in ACSRB. See Table 19-2 on page 131.
4. Asymmetrical versus Symmetrical PWM is determined by the Timer 2 Count Mode. See Section 13.4 on page 77.
Table 13-5. T2CCC – Timer/Counter 2 Compare/Capture Control
T2CCC Address = 0D4H Reset Value = 00X0 0000B
Not Bit Addressable
CIENx CDIRx –CTCx CCMx CxM2 CxM1 CxM0
Bit76543210
Symbol Function
CIENx Channel X Interrupt Enable. When set, channel X’s interrupt flag, CCFx in T2CCF, will generate an interrupt when ECC
= 1. Clear to disable interrupts from channel X.
CDIRx Channel X Capture Direction. In dual-slope modes, a compare/capture event on channel
X will store the current count
direction into CDIRx. Up-counting = 0 and down-counting = 1. Modifying this bit has no effect.
CTCx Clear Timer on Compare/Capture of Channel X. When set, the Timer 2 registers TL2 and TH2 will be cleared by a
compare/capture event on channel X. When cleared, Timer 2 is unaffected by channel X events.
CCMx Channel X Compare/Capture Mode. When CCMx = 1, channel X opera
tes in compare mode. When CCMx = 0, channel
X operates in capture mode.
CxM[2-0] Channel X Mode. Selects the output/input events for compare/capture channel X.
CxM2 CxM1 CxM0 Capture Event (CCMx = 0)
000Disabled
001Trigger on negative edge of CCx pin
010Trigger on positive edge of CCx pin
011Trigger on either edge of CCx pin
100Trigger on Timer 0 overflow
101Trigger on Timer 1 overflow
110Trigger on Analog Comparator A Event
(2)
111Trigger on Analog Comparator B Event
(3)
CxM2 CxM1 CxM0 Compare Action (CCMx = 1)
000Output disabled (interrupt only)
001Set CCx pin on compare match
010Clear CCx pin on compare match
011Toggle CCx pin on compare match
100Inverting Pulse Width Modulation
(4)
101Non-Inverting Pulse Width Modulation
(4)
110Reserved
111Reserved