EasyManuals Logo

Atmel AVR XMEGA AU series User Manual

Atmel AVR XMEGA AU series
512 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #178 background imageLoading...
Page #178 background image
178
8331B–AVR–03/12
Atmel AVR XMEGA AU
synchronization prevents the occurrence of odd-length, non-symmetrical pulses for glitch-free
output.
14.8.1 Waveform Generation
The compare channels can be used for waveform generation on the corresponding port pins. To
make the waveform visible on the connected port pin, the following requirements must be
fulfilled:
1. A waveform generation mode must be selected.
2. Event actions must be disabled.
3. The CC channels used must be enabled. This will override the corresponding port pin
output register.
4. The direction for the associated port pin must be set to output.
Inverted waveform output is achieved by setting the invert output bit for the port pin.
14.8.2 Frequency (FRQ) Waveform Generation
For frequency generation the period time (T) is controlled by the CCA register instead of PER.
The waveform generation (WG) output is toggled on each compare match between the CNT and
CCA registers, as shown in Figure 14-14 on page 178.
Figure 14-14. Frequency waveform generation.
The waveform frequency (f
FRQ
) is defined by the following equation:
where N represents the prescaler divider used. The waveform generated will have a maximum
frequency of half of the peripheral clock frequency (fclk
PER
) when CCA is set to zero (0x0000)
and no prescaling is used. This also applies when using the hi-res extension, since this
increases the resolution and not the frequency.
14.8.3 Single-slope PWM Generation
For single-slope PWM generation, the period (T) is controlled by PER, while CCx registers con-
trol the duty cycle of the WG output. Figure 14-15 shows how the counter counts from BOTTOM
CNT
MAX
"update"
TOP
CNT writtenDirection Change
Period (T)
BOTTOM
WG Output
f
FRQ
fclk
PER
2N CCA 1+()
---------------------------------- -=

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel AVR XMEGA AU series and is the answer not in the manual?

Atmel AVR XMEGA AU series Specifications

General IconGeneral
BrandAtmel
ModelAVR XMEGA AU series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals