Atmega32(l) – Rainbow Electronics ATmega32L User Manual
Page 309

ii
ATmega32(L)
2503C–AVR–10/02
Minimizing Power Consumption ......................................................................... 32
System Control and Reset ................................................................. 34
Internal Voltage Reference ................................................................................. 39
Watchdog Timer ................................................................................................. 39
Interrupts ............................................................................................. 42
Interrupt Vectors in ATmega32........................................................................... 42
I/O Ports............................................................................................... 47
Introduction ......................................................................................................... 47
Ports as General Digital I/O ................................................................................ 48
Alternate Port Functions ..................................................................................... 52
Register Description for I/O Ports ....................................................................... 62
External Interrupts .............................................................................. 64
8-bit Timer/Counter0 with PWM......................................................... 67
Overview............................................................................................................. 67
Timer/Counter Clock Sources............................................................................. 68
Counter Unit........................................................................................................ 68
Output Compare Unit.......................................................................................... 69
Compare Match Output Unit ............................................................................... 70
Modes of Operation ............................................................................................ 71
Timer/Counter Timing Diagrams......................................................................... 76
8-bit Timer/Counter Register Description ........................................................... 78
Timer/Counter0 and Timer/Counter1 Prescalers ............................. 82
16-bit Timer/Counter1......................................................................... 84
Overview............................................................................................................. 84
Accessing 16-bit Registers ................................................................................. 87
Timer/Counter Clock Sources............................................................................. 89
Counter Unit........................................................................................................ 89
Input Capture Unit............................................................................................... 91
Output Compare Units ........................................................................................ 92
Compare Match Output Unit ............................................................................... 94
Modes of Operation ............................................................................................ 95
Timer/Counter Timing Diagrams....................................................................... 103
16-bit Timer/Counter Register Description ....................................................... 105
8-bit Timer/Counter2 with PWM and Asynchronous Operation ... 112
Overview........................................................................................................... 112
Timer/Counter Clock Sources........................................................................... 113
Counter Unit...................................................................................................... 113
Output Compare Unit........................................................................................ 114