Datasheet
2018 Microchip Technology Inc. Data Sheet Complete DS40002061A-page 6
ATmega48A/PA/88A/PA/168A/PA/328/P
18.2 Overview........................................................................................................ 150
18.3 Timer/Counter Clock Sources ....................................................................... 151
18.4 Counter Unit .................................................................................................. 151
18.5 Output Compare Unit..................................................................................... 152
18.6 Compare Match Output Unit.......................................................................... 154
18.7 Modes of Operation ....................................................................................... 155
18.8 Timer/Counter Timing Diagrams ................................................................... 159
18.9 Asynchronous Operation of Timer/Counter2 ................................................. 160
18.10 Timer/Counter Prescaler ............................................................................... 161
18.11 Register Description ...................................................................................... 162
19 SPI – Serial Peripheral Interface ............................................................................... 169
19.1 Features ........................................................................................................ 169
19.2 Overview........................................................................................................ 169
19.3 SS Pin Functionality ...................................................................................... 174
19.4 Data Modes ................................................................................................... 174
19.5 Register Description ...................................................................................... 176
20 USART0 .................................................................................................................................... 179
20.1 Features ........................................................................................................ 179
20.2 Overview........................................................................................................ 179
20.3 Clock Generation........................................................................................... 180
20.4 Frame Formats .............................................................................................. 183
20.5 USART Initialization....................................................................................... 184
20.6 Data Transmission – The USART Transmitter .............................................. 185
20.7 Data Reception – The USART Receiver ....................................................... 188
20.8 Asynchronous Data Reception ...................................................................... 192
20.9 Multi-processor Communication Mode .......................................................... 195
20.10 Examples of Baud Rate Setting..................................................................... 196
20.11 Register Description ...................................................................................... 200
21 USART in SPI Mode .......................................................................................................... 205
21.1 Features ........................................................................................................ 205
21.2 Overview........................................................................................................ 205
21.3 Clock Generation........................................................................................... 205
21.4 SPI Data Modes and Timing.......................................................................... 206
21.5 Frame Formats .............................................................................................. 206
21.6 Data Transfer................................................................................................. 209