76
8331B–AVR–03/12
Atmel AVR XMEGA AU
6.5
Event Timing
An event normally lasts for one peripheral clock cycle, but some event sources, such as a low
level on an I/O pin, will generate events continuously. Details on this are described in the
datasheet for each peripheral, but unless otherwise stated, an event lasts for one peripheral
clock cycle.
It takes a maximum of two peripheral clock cycles from when an event is generated until the
event actions in other peripherals are triggered. This ensures short and 100% predictable
response times, independent of CPU or DMA controller load or software revisions.
6.6
Filtering
Each event channel includes a digital filter. When this is enabled, an event must be sampled
with the same value for a configurable number of system clock cycles before it is accepted. This
is primarily intended for pin change events.
6.7
Quadrature Decoder
The event system includes three quadrature decoders (QDECs), which enable the device to
decode quadrature input on I/O pins and send data events that a timer/counter can decode to
count up, count down, or index/reset.
summarizes which quadrature
decoder data events are available, how they are decoded, and how they can be generated. The
QDECs and related features and control and status registers are available for event channels 0,
2, and 4.
6.7.1
Quadrature Operation
A quadrature signal is characterized by having two square waves that are phase shifted 90
degrees relative to each other. Rotational movement can be measured by counting the edges of
the two waveforms. The phase relationship between the two square waves determines the
direction of rotation.
Table 6-2.
Quadrature decoder data events.
STROBE
DATA
Data Event User
Signaling Event User
0
0
No event
No event
0
1
Index/reset
No event
1
0
Count down
Signaling event
1
1
Count up
Signaling event