A000047 Arduino, A000047 Datasheet - Page 184

MCU, MPU & DSP Development Tools Mega2560

A000047

Manufacturer Part Number
A000047
Description
MCU, MPU & DSP Development Tools Mega2560
Manufacturer
Arduino
Series
-r
Type
MCUr
Datasheets

Specifications of A000047

Processor To Be Evaluated
ATmega2560
Interface Type
USB, I2C, SPI
Dimensions
4 in x 2.1 in
Operating Supply Voltage
5 V
Contents
Board
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
ATmega2560
19.8
2549M–AVR–09/10
Asynchronous Operation of Timer/Counter2
Figure 19-10
Figure 19-10. Timer/Counter Timing Diagram, Setting of OCF2A, with Prescaler (f
Figure 19-11
Figure 19-11. Timer/Counter Timing Diagram, Clear Timer on Compare Match mode, with Pres-
When Timer/Counter2 operates asynchronously, some considerations must be taken.
Warning: When switching between asynchronous and synchronous clocking of
Timer/Counter2, the Timer Registers TCNT2, OCR2x, and TCCR2x might be corrupted. A
safe procedure for switching clock source is:
1. Disable the Timer/Counter2 interrupts by clearing OCIE2x and TOIE2.
2. Select clock source by setting AS2 as appropriate.
3. Write new values to TCNT2, OCR2x, and TCCR2x.
4. To switch to asynchronous operation: Wait for TCN2UB, OCR2xUB, and TCR2xUB.
5. Clear the Timer/Counter2 Interrupt Flags.
6. Enable interrupts, if needed.
TCNTn
TCNTn
(clk
(clk
OCRnx
(CTC)
OCRnx
OCFnx
OCFnx
clk
clk
clk
clk
I/O
I/O
I/O
I/O
Tn
Tn
/8)
/8)
shows the setting of OCF2A in all modes except CTC mode.
shows the setting of OCF2A and the clearing of TCNT2 in CTC mode.
caler (f
clk_I/O
OCRnx - 1
TOP - 1
/8)
ATmega640/1280/1281/2560/2561
TOP
OCRnx
OCRnx Value
TOP
BOTTOM
OCRnx + 1
BOTTOM + 1
OCRnx + 2
clk_I/O
/8)
184

Related parts for A000047