335
7530J–AVR–03/12
Atmel ATmega48/88/168 Automotive
13
Timer/Counter0 and Timer/Counter1 Prescalers .............................. 103
14
16-bit Timer/Counter1 with PWM ........................................................ 105
14.1
Overview ........................................................................................................105
14.2
Accessing 16-bit Registers ............................................................................107
14.3
Timer/Counter Clock Sources .......................................................................110
14.4
Counter Unit ..................................................................................................111
14.5
Input Capture Unit .........................................................................................112
14.6
Output Compare Units ...................................................................................114
14.7
Compare Match Output Unit ..........................................................................116
14.8
Modes of Operation .......................................................................................117
14.9
Timer/Counter Timing Diagrams ...................................................................125
14.10
16-bit Timer/Counter Register Description ....................................................127
15
8-bit Timer/Counter2 with PWM and Asynchronous Operation ...... 134
15.1
Overview ........................................................................................................134
15.2
Timer/Counter Clock Sources .......................................................................136
15.3
Counter Unit ..................................................................................................136
15.4
Output Compare Unit .....................................................................................137
15.5
Compare Match Output Unit ..........................................................................138
15.6
Modes of Operation .......................................................................................140
15.7
Timer/Counter Timing Diagrams ...................................................................144
15.8
8-bit Timer/Counter Register Description ......................................................146
15.9
Asynchronous operation of the Timer/Counter ..............................................152
15.10
Timer/Counter Prescaler ...............................................................................155
16
Serial Peripheral Interface – SPI ......................................................... 156
16.1
SS Pin Functionality ......................................................................................161
16.2
Data Modes ...................................................................................................163
17
USART0 ................................................................................................. 165
17.1
Overview ........................................................................................................165
17.2
Clock Generation ...........................................................................................167
Frame Formats .............................................................................................. 170
17.4
USART Initialization .......................................................................................171
17.5
Data Transmission – The USART Transmitter ..............................................172
17.6
Data Reception – The USART Receiver .......................................................175
17.7
Asynchronous Data Reception ......................................................................179
17.8
Multi-processor Communication Mode ..........................................................183