339
7810C–AVR–10/12
Atmel ATmega328P [Preliminary]
13
I/O-Ports .................................................................................................. 66
13.1
Overview ..........................................................................................................66
13.2
Ports as General Digital I/O .............................................................................67
13.3
Alternate Port Functions ..................................................................................71
13.4
Register Description ........................................................................................84
14
8-bit Timer/Counter0 with PWM ............................................................ 86
14.1
Features ..........................................................................................................86
14.2
Overview ..........................................................................................................86
14.3
Timer/Counter Clock Sources .........................................................................87
14.4
Counter Unit ....................................................................................................87
14.5
Output Compare Unit .......................................................................................88
14.6
Compare Match Output Unit ............................................................................90
14.7
Modes of Operation .........................................................................................91
14.8
Timer/Counter Timing Diagrams .....................................................................95
14.9
Register Description ........................................................................................97
15
16-bit Timer/Counter1 with PWM ........................................................ 104
15.1
Features ........................................................................................................104
15.2
Overview ........................................................................................................104
15.3
Accessing 16-bit Registers ............................................................................106
15.4
Timer/Counter Clock Sources .......................................................................109
15.5
Counter Unit ..................................................................................................110
15.6
Input Capture Unit .........................................................................................111
15.7
Output Compare Units ...................................................................................113
15.8
Compare Match Output Unit ..........................................................................115
15.9
Modes of Operation .......................................................................................116
15.10
Timer/Counter Timing Diagrams ...................................................................124
15.11
Register Description ......................................................................................126
16
Timer/Counter0 and Timer/Counter1 Prescalers .............................. 133
16.1
Internal Clock Source ....................................................................................133
16.2
Prescaler Reset .............................................................................................133
16.3
External Clock Source ...................................................................................133
16.4
Register Description ......................................................................................135
17
8-bit Timer/Counter2 with PWM and Asynchronous Operation ...... 136
17.1
Features ........................................................................................................136
17.2
Overview ........................................................................................................136