Datasheet

Table Of Contents
33
8493A–AVR–02/12
XMEGA C4
A timer/counter can be clocked and timed from the peripheral clock with optional prescaling or
from the event system. The event system can also be used for direction control and capture trig-
ger or to synchronize operations.
There are two differences between timer/counter type 0 and type 1. Timer/counter 0 has four CC
channels, and timer/counter 1 has two CC channels. All information related to CC channels 3
and 4 is valid only for timer/counter 0. Only Timer/Counter 0 has the split mode feature that split
it into two 8-bit Timer/Counters with four compare channels each.
Some timer/counters have extensions to enable more specialized waveform and frequency gen-
eration. The advanced waveform extension (AWeX) is intended for motor control and other
power control applications. It enables low- and high-side output with dead-time insertion, as well
as fault protection for disabling and shutting down external drivers. It can also generate a syn-
chronized bit pattern across the port pins.
The advanced waveform extension can be enabled to provide extra and more advanced fea-
tures for the Timer/Counter. This are only available for Timer/Counter 0. See ”AWeX –
Advanced Waveform Extension” on page 35 for more details.
The high-resolution (hi-res) extension can be used to increase the waveform output resolution
by four or eight times by using an internal clock source running up to four times faster than the
peripheral clock. See ”Hi-Res – High Resolution Extension” on page 36 for more details.
Figure 15-1. Overview of a Timer/Counter and closely related peripherals.
PORTC has one Timer/Counter 0 and one Timer/Counter1. PORTD, PORTE and PORTF each
has one Timer/Counter 0. Notation of these are TCC0 (Time/Counter C0), TCC1, TCD0, TCE0,
and TCF0, respectively.
AWeX
Compare/Capture Channel D
Compare/Capture Channel C
Compare/Capture Channel B
Compare/Capture Channel A
Waveform
Generation
Buffer
Comparator
Hi-Res
Fault
Protection
Capture
Control
Base Counter
Counter
Control Logic
Timer Period
Prescaler
Dead-Time
Insertion
Pattern
Generation
clk
PER4
PORT
Event
System
clk
PER
Timer/Counter