Datasheet
iv
8011Q–AVR–02/2013
ATmega164P/324P/644P
14.5 Output Compare Unit .........................................................................................141
14.6 Compare Match Output Unit ...............................................................................143
14.7 Modes of Operation ............................................................................................144
14.8 Timer/Counter Timing Diagrams ........................................................................148
14.9 Asynchronous Operation of Timer/Counter2 ......................................................150
14.10 Timer/Counter Prescaler ..................................................................................152
14.11 Register Description .........................................................................................152
15 SPI – Serial Peripheral Interface ......................................................... 161
15.1 Features .............................................................................................................161
15.2 Overview ............................................................................................................161
15.3 SS
Pin Functionality ...........................................................................................166
15.4 Data Modes ........................................................................................................166
15.5 Register Description ...........................................................................................168
16 USART ................................................................................................... 171
16.1 Features .............................................................................................................171
16.2 USART1 and USART0 .......................................................................................171
16.3 Overview ............................................................................................................171
16.4 Clock Generation ................................................................................................172
16.5 Frame Formats ...................................................................................................175
16.6 USART Initialization ...........................................................................................176
16.7 Data Transmission – The USART Transmitter ...................................................177
16.8 Data Reception – The USART Receiver ............................................................180
16.9 Asynchronous Data Reception ...........................................................................184
16.10 Multi-processor Communication Mode .............................................................187
16.11 Register Description .........................................................................................189
16.12 Examples of Baud Rate Setting .......................................................................194
17 USART in SPI Mode ............................................................................. 198
17.1 Features .............................................................................................................198
17.2 Overview ............................................................................................................198
17.3 Clock Generation ................................................................................................198
17.4 SPI Data Modes and Timing ..............................................................................199
17.5 Frame Formats ...................................................................................................199
17.6 Data Transfer .....................................................................................................201
17.7 AVR USART MSPIM vs. AVR SPI .....................................................................203
17.8 Register Description ...........................................................................................204