English
Language : 

ATXMEGA128A4_1012 Datasheet, PDF (31/108 Pages) ATMEL Corporation – 8/16-bit XMEGA A4 Microcontroller
XMEGA A4
16. T/C - 16-bit Timer/Counter
16.1 Features
16.2 Overview
• Five 16-bit Timer/Counters
– Three Timer/Counters of type 0
– Two Timer/Counters of type 1
• Three Compare or Capture (CC) Channels in Timer/Counter 0
• Two Compare or Capture (CC) Channels in Timer/Counter 1
• Double Buffered Timer Period Setting
• Double Buffered Compare or Capture Channels
• Waveform Generation:
– Single Slope Pulse Width Modulation
– Dual Slope Pulse Width Modulation
– Frequency Generation
• Input Capture:
– Input Capture with Noise Cancelling
– Frequency capture
– Pulse width capture
– 32-bit input capture
• Event Counter with Direction Control
• Timer Overflow and Timer Error Interrupts and Events
• One Compare Match or Capture Interrupt and Event per CC Channel
• Supports DMA Operation
• Hi-Resolution Extension (Hi-Res)
• Advanced Waveform Extension (AWEX)
XMEGA A4 has five Timer/Counters, three Timer/Counter 0 and two Timer/Counter 1. The dif-
ference between them is that Timer/Counter 0 has four Compare/Capture channels, while
Timer/Counter 1 has two Compare/Capture channels.
The Timer/Counters (T/C) are 16-bit and can count any clock, event or external input in the
microcontroller. A programmable prescaler is available to get a useful T/C resolution. Updates of
Timer and Compare registers are double buffered to ensure glitch free operation. Single slope
PWM, dual slope PWM and frequency generation waveforms can be generated using the Com-
pare Channels.
Through the Event System, any input pin or event in the microcontroller can be used to trigger
input capture, hence no dedicated pins are required for this. The input capture has a noise can-
celler to avoid incorrect capture of the T/C, and can be used to do frequency and pulse width
measurements.
A wide range of interrupt or event sources are available, including T/C Overflow, Compare
match and Capture for each Compare/Capture channel in the T/C.
PORTC and PORTD each has one Timer/Counter 0 and one Timer/Counter1. PORTE has one
Timer/Conter0. Notation of these are TCC0 (Time/Counter C0), TCC1, TCD0, TCD1 and TCE0,
respectively.
31
8069Q–AVR–12/10