Datasheet
iii
8011Q–AVR–02/2013
ATmega164P/324P/644P
10 External Interrupts ................................................................................. 67
10.1 Overview ..............................................................................................................67
10.2 Register Description .............................................................................................67
11 I/O-Ports .................................................................................................. 72
11.1 Overview ..............................................................................................................72
11.2 Ports as General Digital I/O ..................................................................................73
11.3 Alternate Port Functions .......................................................................................78
11.4 Register Description .............................................................................................91
12 8-bit Timer/Counter0 with PWM ............................................................ 93
12.1 Features ...............................................................................................................93
12.2 Overview ..............................................................................................................93
12.3 Timer/Counter Clock Sources ..............................................................................94
12.4 Counter Unit .........................................................................................................94
12.5 Output Compare Unit ...........................................................................................95
12.6 Compare Match Output Unit .................................................................................97
12.7 Modes of Operation ..............................................................................................98
12.8 Timer/Counter Timing Diagrams ........................................................................102
12.9 Register Description ...........................................................................................104
13 16-bit Timer/Counter1 with PWM ........................................................ 111
13.1 Features .............................................................................................................111
13.2 Overview ............................................................................................................111
13.3 Accessing 16-bit Registers .................................................................................113
13.4 Timer/Counter Clock Sources ............................................................................116
13.5 Counter Unit .......................................................................................................117
13.6 Input Capture Unit ..............................................................................................118
13.7 Output Compare Units ........................................................................................120
13.8 Compare Match Output Unit ...............................................................................122
13.9 Modes of Operation ............................................................................................123
13.10 Timer/Counter Timing Diagrams ......................................................................130
13.11 Register Description .........................................................................................132
14 8-bit Timer/Counter2 with PWM and Asynchronous Operation ...... 139
14.1 Features .............................................................................................................139
14.2 Overview ............................................................................................................139
14.3 Timer/Counter Clock Sources ............................................................................140
14.4 Counter Unit .......................................................................................................141