16.10 Timer/Counter Prescaler ..................................................................................152
16.11 Register Description .........................................................................................152
17 SPI – Serial Peripheral Interface ......................................................... 161
17.1 Features .............................................................................................................161
17.2 Overview ............................................................................................................161
17.3 SS Pin Functionality ...........................................................................................166
17.4 Data Modes ........................................................................................................166
17.5 Register Description ...........................................................................................168
18 USART ................................................................................................... 171
18.1 Features .............................................................................................................171
18.2 USART1 and USART0 .......................................................................................171
18.3 Overview ............................................................................................................171
18.4 Clock Generation ................................................................................................172
18.5 Frame Formats ...................................................................................................175
18.6 USART Initialization ...........................................................................................176
18.7 Data Transmission – The USART Transmitter ...................................................177
18.8 Data Reception – The USART Receiver ............................................................180
18.9 Asynchronous Data Reception ...........................................................................184
18.10 Multi-processor Communication Mode .............................................................187
18.11 Register Description .........................................................................................189
18.12 Examples of Baud Rate Setting .......................................................................194
19 USART in SPI Mode ............................................................................. 198
19.1 Features .............................................................................................................198
19.2 Overview ............................................................................................................198
19.3 Clock Generation ................................................................................................198
19.4 SPI Data Modes and Timing ..............................................................................199
19.5 Frame Formats ...................................................................................................199
19.6 Data Transfer .....................................................................................................201
19.7 AVR USART MSPIM vs. AVR SPI .....................................................................203
19.8 Register Description ...........................................................................................204
20 2-wire Serial Interface .......................................................................... 207
20.1 Features .............................................................................................................207
20.2 2-wire Serial Interface Bus Definition .................................................................207
20.3 Data Transfer and Frame Format .......................................................................208
20.4 Multi-master Bus Systems, Arbitration and Synchronization ..............................211
20.5 Overview of the TWI Module ..............................................................................213
20.6 Using the TWI .....................................................................................................215
20.7 Transmission Modes ..........................................................................................218
20.8 Multi-master Systems and Arbitration .................................................................231
20.9 Register Description ...........................................................................................232
21 AC - Analog Comparator ..................................................................... 237
21.1 Overview ............................................................................................................237
21.2 Analog Comparator Multiplexed Input ................................................................237
21.3 Register Description ...........................................................................................238
22 ADC - Analog-to-digital Converter ..................................................... 240
22.1 Features .............................................................................................................240
22.2 Overview ............................................................................................................240
22.3 Operation ............................................................................................................241
22.4 Starting a Conversion .........................................................................................242
22.5 Prescaling and Conversion Timing .....................................................................243
22.6 Changing Channel or Reference Selection ........................................................246
22.7 ADC Noise Canceler ..........................................................................................248
22.8 ADC Conversion Result .....................................................................................253