Datasheet
iv
8011K–AVR–09/08
ATmega164P/324P/644P
16.11 Register Description .........................................................................................153
17 SPI – Serial Peripheral Interface ......................................................... 162
17.1 Features .............................................................................................................162
17.2 Overview ............................................................................................................162
17.3 SS
Pin Functionality ...........................................................................................167
17.4 Data Modes ........................................................................................................167
17.5 Register Description ...........................................................................................169
18 USART ................................................................................................... 172
18.1 Features .............................................................................................................172
18.2 USART1 and USART0 .......................................................................................172
18.3 Overview ............................................................................................................172
18.4 Clock Generation ................................................................................................173
18.5 Frame Formats ...................................................................................................176
18.6 USART Initialization ...........................................................................................177
18.7 Data Transmission – The USART Transmitter ...................................................178
18.8 Data Reception – The USART Receiver ............................................................181
18.9 Asynchronous Data Reception ...........................................................................185
18.10 Multi-processor Communication Mode .............................................................188
18.11 Register Description .........................................................................................190
18.12 Examples of Baud Rate Setting .......................................................................195
19 USART in SPI Mode ............................................................................. 199
19.1 Features .............................................................................................................199
19.2 Overview ............................................................................................................199
19.3 Clock Generation ................................................................................................199
19.4 SPI Data Modes and Timing ..............................................................................200
19.5 Frame Formats ...................................................................................................200
19.6 Data Transfer .....................................................................................................202
19.7 AVR USART MSPIM vs. AVR SPI .....................................................................204
19.8 Register Description ...........................................................................................205
20 2-wire Serial Interface .......................................................................... 208
20.1 Features .............................................................................................................208
20.2 2-wire Serial Interface Bus Definition .................................................................208
20.3 Data Transfer and Frame Format .......................................................................209
20.4 Multi-master Bus Systems, Arbitration and Synchronization ..............................212
20.5 Overview of the TWI Module ..............................................................................214