Datasheet

22.6. Compare Match Output Unit.....................................................................................................204
22.7. Modes of Operation..................................................................................................................205
22.8. Timer/Counter Timing Diagrams.............................................................................................. 209
22.9. Asynchronous Operation of Timer/Counter2............................................................................210
22.10. Timer/Counter Prescaler.......................................................................................................... 212
22.11. Register Description................................................................................................................. 212
23. Serial Peripheral Interface (SPI)............................................................................227
23.1. Features................................................................................................................................... 227
23.2. Overview.................................................................................................................................. 227
23.3. SS Pin Functionality................................................................................................................. 231
23.4. Data Modes..............................................................................................................................231
23.5. Register Description................................................................................................................. 232
24. Universal Synchronous Asynchronous Receiver Transceiver (USART)............... 237
24.1. Features................................................................................................................................... 237
24.2. Overview.................................................................................................................................. 237
24.3. Block Diagram..........................................................................................................................237
24.4. Clock Generation......................................................................................................................238
24.5. Frame Formats.........................................................................................................................241
24.6. USART Initialization................................................................................................................. 242
24.7. Data Transmission – The USART Transmitter......................................................................... 243
24.8. Data Reception – The USART Receiver.................................................................................. 245
24.9. Asynchronous Data Reception.................................................................................................249
24.10. Multi-Processor Communication Mode.................................................................................... 252
24.11. Examples of Baud Rate Setting............................................................................................... 252
24.12. Register Description.................................................................................................................255
25. USART in SPI (USARTSPI) Mode.........................................................................265
25.1. Features................................................................................................................................... 265
25.2. Overview.................................................................................................................................. 265
25.3. Clock Generation......................................................................................................................265
25.4. SPI Data Modes and Timing.....................................................................................................266
25.5. Frame Formats.........................................................................................................................266
25.6. Data Transfer............................................................................................................................268
25.7. AVR USART MSPIM vs. AVR SPI............................................................................................269
25.8. Register Description................................................................................................................. 270
26. Two-Wire Serial Interface (TWI)............................................................................ 271
26.1. Features................................................................................................................................... 271
26.2. Two-Wire Serial Interface Bus Definition..................................................................................271
26.3. Data Transfer and Frame Format.............................................................................................272
26.4. Multi-Master Bus Systems, Arbitration, and Synchronization...................................................275
26.5. Overview of the TWI Module.................................................................................................... 277
26.6. Using the TWI...........................................................................................................................279
26.7. Transmission Modes................................................................................................................ 282
26.8. Multi-Master Systems and Arbitration...................................................................................... 300
26.9. Register Description................................................................................................................. 301
ATmega48PA/88PA/168PA
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002011A-page 6