ATmega88PA Automotive Atmel Corporation, ATmega88PA Automotive Datasheet - Page 100

no-image

ATmega88PA Automotive

Manufacturer Part Number
ATmega88PA Automotive
Description
Manufacturer
Atmel Corporation
14.7
100
Output Compare Units
Atmel ATtiny24/44/84 [Preliminary]
Measurement of an external signal's duty cycle requires that the trigger edge be changed after
each capture. Changing the edge sensing must be done as early as possible after the ICR1
register has been read. After a change of the edge, the input capture flag (ICF1) must be
cleared by software (writing a logical one to the I/O bit location). For measuring frequency
only, the clearing of the ICF1 flag is not required (if an interrupt handler is used).
The 16-bit comparator continuously compares TCNT1 with the output compare register
(OCR1x). If TCNT equals OCR1x, the comparator signals a match. A match will set the output
compare flag (OCF1x) at the next timer clock cycle. If enabled (OCIE1x = 1), the output com-
pare flag generates an output compare interrupt. The OCF1x flag is automatically cleared
when the interrupt is executed. Alternatively the OCF1x flag can be cleared by software by
writing a logical one to its I/O bit location. The waveform generator uses the match signal to
generate an output according to the operating mode set by the waveform generation mode
(WGM13:0) bits and compare output mode (COM1x1:0) bits. The top and bottom signals are
used by the waveform generator for handling the special cases of the extreme values in some
modes of operation
A special feature of Output Compare unit A allows it to define the Timer/Counter TOP value
(i.e., counter resolution). In addition to the counter resolution, the TOP value defines the
period time for waveforms generated by the Waveform Generator.
Figure 14-4 on page 100
the register and bit names indicates the device number (n = 1 for timer/counter 1), and the "x"
indicates output compare unit (A/B). The elements of the block diagram that are not directly a
part of the output compare unit are shaded gray.
Figure 14-4. Output Compare Unit, Block Diagram
(“Modes of Operation” on page
OCRnxH Buf. (8-bit)
shows a block diagram of the output compare unit. The small "n" in
OCRnxH (8-bit)
BOTTOM
OCRnx Buffer (16-bit Register)
TEMP (8-bit)
TOP
OCRnx (16-bit Register)
OCRnxL Buf. (8-bit)
OCRnxL (8-bit)
DATA BUS
Waveform Generator
WGMn3:0
=
(16-bit Comparator )
103).
(8-bit)
COMnx1:0
TCNTnH (8-bit)
OCFnx (Int.Req.)
TCNTn (16-bit Counter)
TCNTnL (8-bit)
7701E–AVR–02/11
OCnx

Related parts for ATmega88PA Automotive