Datasheet
2018 Microchip Technology Inc. Data Sheet Complete DS40002070A-page 6
ATmega164A/PA/324A/PA/644A/PA/1284/P
17.7 Modes of operation........................................................................................ 151
17.8 Timer/Counter Timing diagrams .................................................................... 155
17.9 Asynchronous Operation of Timer/Counter2 ................................................. 156
17.10 Timer/Counter Prescaler ............................................................................... 158
17.11 Register description....................................................................................... 159
18 SPI – Serial Peripheral Interface ............................................................................... 166
18.1 Features ........................................................................................................ 166
18.2 Overview........................................................................................................ 166
18.3 SS pin functionality ........................................................................................ 170
18.4 Data modes ................................................................................................... 170
18.5 Register description....................................................................................... 172
19 USART ...................................................................................................................................... 175
19.1 Features ........................................................................................................ 175
19.2 USART1 and USART0 .................................................................................. 175
19.3 Overview........................................................................................................ 175
19.4 Clock Generation........................................................................................... 176
19.5 Frame formats ............................................................................................... 179
19.6 USART Initialization....................................................................................... 180
19.7 Data Transmission – The USART Transmitter .............................................. 181
19.8 Data Reception – The USART Receiver ....................................................... 184
19.9 Asynchronous Data Reception ...................................................................... 188
19.10 Multi-processor Communication mode .......................................................... 191
19.11 Register description....................................................................................... 193
19.12 Examples of Baud Rate Setting..................................................................... 198
20 USART in SPI mode .......................................................................................................... 202
20.1 Features ........................................................................................................ 202
20.2 Overview........................................................................................................ 202
20.3 Clock Generation........................................................................................... 202
20.4 SPI Data Modes and Timing.......................................................................... 203
20.5 Frame Formats .............................................................................................. 203
20.6 Data Transfer................................................................................................. 205
20.7 AVR USART MSPIM vs. AVR SPI ................................................................ 207
20.8 Register description....................................................................................... 208
21 Two-wire Serial Interface .............................................................................................. 211
21.1 Features ........................................................................................................ 211