Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

ATmega64A Datasheet(PDF) 103 Page - ATMEL Corporation

Part # ATmega64A
Description  8-bit Microcontroller with 64K Bytes In-System Programmable Flash
PDF  392 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  ATMEL [ATMEL Corporation]
Direct Link  http://www.atmel.com
Logo ATMEL - ATMEL Corporation

ATmega64A Datasheet(HTML) 103 Page - ATMEL Corporation

Back Button ATmega64A Datasheet HTML 99Page - ATMEL Corporation ATmega64A Datasheet HTML 100Page - ATMEL Corporation ATmega64A Datasheet HTML 101Page - ATMEL Corporation ATmega64A Datasheet HTML 102Page - ATMEL Corporation ATmega64A Datasheet HTML 103Page - ATMEL Corporation ATmega64A Datasheet HTML 104Page - ATMEL Corporation ATmega64A Datasheet HTML 105Page - ATMEL Corporation ATmega64A Datasheet HTML 106Page - ATMEL Corporation ATmega64A Datasheet HTML 107Page - ATMEL Corporation Next Button
Zoom Inzoom in Zoom Outzoom out
 103 / 392 page
background image
103
8160C–AVR–07/09
ATmega64A
Figure 14-11. Timer/Counter Timing Diagram, Clear Timer on Compare Match Mode, with Pres-
caler (f
clk_I/O/8)
14.9
Asynchronous Operation of the Timer/Counter
14.9.1
Asynchronous Operation of Timer/Counter0
When Timer/Counter0 operates asynchronously, some considerations must be taken.
• Warning: When switching between asynchronous and synchronous clocking of
Timer/Counter0, the timer registers TCNT0, OCR0, and TCCR0 might be corrupted. A safe
procedure for switching clock source is:
1.
Disable the Timer/Counter0 interrupts by clearing OCIE0 and TOIE0.
2.
Select clock source by setting AS0 as appropriate.
3.
Write new values to TCNT0, OCR0, and TCCR0.
4.
To switch to asynchronous operation: Wait for TCN0UB, OCR0UB, and TCR0UB.
5.
Clear the Timer/Counter0 interrupt flags.
6.
Enable interrupts, if needed.
• The Oscillator is optimized for use with a 32.768 kHz watch crystal. Applying an external
clock to the TOSC1 pin may result in incorrect Timer/Counter0 operation. The CPU main
clock frequency must be more than four times the Oscillator frequency.
• When writing to one of the registers TCNT0, OCR0, or TCCR0, the value is transferred to a
temporary register, and latched after two positive edges on TOSC1. The user should not
write a new value before the contents of the temporary register have been transferred to its
destination. Each of the three mentioned registers have their individual temporary register, for
example, writing to TCNT0 does not disturb an OCR0 write in progress. To detect that a
transfer to the destination register has taken place, the Asynchronous Status Register –
ASSR has been implemented.
• When entering Power-save or Extended Standby mode after having written to TCNT0,
OCR0, or TCCR0, the user must wait until the written register has been updated if
Timer/Counter0 is used to wake up the device. Otherwise, the MCU will enter sleep mode
before the changes are effective. This is particularly important if the Output Compare0
interrupt is used to wake up the device, since the Output Compare function is disabled during
writing to OCR0 or TCNT0. If the write cycle is not finished, and the MCU enters sleep mode
before the OCR0UB bit returns to zero, the device will never receive a Compare Match
interrupt, and the MCU will not wake up.
OCFn
OCRn
TCNTn
(CTC)
TOP
TOP - 1
TOP
BOTTOM
BOTTOM + 1
clk
I/O
clk
Tn
(clk
I/O/8)



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com