
96
ATmega8515(L)
2512A–AVR–04/02
also set the Compare Match Flag (OCF1A/B) which can beused to generate an output
compareinterrupt request.
The Input Capture Registercan capturetheTimer/Counter value at a given external
(edge triggered) event on either the Input CapturePin(ICP1) or on theAnalog Compar-
atorpins(See “Analog Comparator”onpage 160.) Theinput captureunitincludes a
digitalfiltering unit (Noise Canceler) forreducing the chanceofcapturing noise spikes.
TheTOPvalue, or maximum Timer/Counter value,can in some modes of operation be
definedbyeither the OCR1A Register, the ICR1 Register, orbya set offixed values.
When using OCR1A as TOPvalueinaPWM mode, the OCR1A Registercan not be
usedfor generating a PWM output. However, theTOPvalue will in thiscase be double
buffered allowing theTOPvalue to be changed in run time. If a fixed TOPvalue is
required, the ICR1 registercan beused as an alternative,freeing the OCR1A to beused
as PWM output.
Definitions The following definitions areused extensively throughout the document:
Compatibility The16-bit Timer/Counterhasbeen updated and improvedfrom previous versions of the
16-bit AVR Timer/Counter.This 16-bit Timer/Counter isfully compatible with theearlier
version regarding:
•All 16-bit Timer/CounterrelatedI/O Register address locations, including timer
interrupt registers.
• Bit locations insideall 16-bit Timer/Counter Registers, including timer interrupt
registers.
• InterruptVectors.
The following controlbitshave changed name,but have same functionality andregister
location:
•PWM10 ischanged to WGM10.
•PWM11 ischanged to WGM11.
• CTC1ischanged to WGM12.
The following bits areadded to the16-bit Timer/CounterControl Registers:
• FOC1A andFOC1B areadded to TCCR1A.
• WGM13 is added to TCCR1B.
The16-bit Timer/Counterhas improvements that will affectthe compatibility in some
specialcases.
Table 49. Definitions
BOTTOM The counterreaches the
BOTTOM
when it becomes 0x0000.
MAX The counterreaches its
MAX
imum when it becomes 0xFFFF (decimal
65535).
TOPThe counterreaches the
TOP
when it becomes equal to the highest
value in the count sequence. TheTOPvalue can beassigned to beone
of the fixed values: 0x00FF, 0x01FF, or 0x03FF, or to thevalue stored in
the OCR1A orICR1 Register.Theassignment isdependent of themode
of operation.
Comentários a estes Manuais