Datasheet

22.2. Description............................................................................................................................... 246
23. SPI – Serial Peripheral Interface........................................................................... 248
23.1. Features................................................................................................................................... 248
23.2. Overview.................................................................................................................................. 248
23.3. SS Pin Functionality................................................................................................................. 252
23.4. Data Modes..............................................................................................................................252
23.5. Register Description................................................................................................................. 253
24. USART - Universal Synchronous Asynchronous Receiver Transceiver................262
24.1. Features................................................................................................................................... 262
24.2. Overview.................................................................................................................................. 262
24.3. Block Diagram.......................................................................................................................... 262
24.4. Clock Generation......................................................................................................................263
24.5. Frame Formats.........................................................................................................................266
24.6. USART Initialization................................................................................................................. 267
24.7. Data Transmission – The USART Transmitter......................................................................... 268
24.8. Data Reception – The USART Receiver.................................................................................. 270
24.9. Asynchronous Data Reception.................................................................................................273
24.10. Multi-Processor Communication Mode.................................................................................... 277
24.11. Examples of Baud Rate Setting............................................................................................... 278
24.12. Register Description.................................................................................................................281
25. USARTSPI - USART in SPI Mode.........................................................................291
25.1. Features................................................................................................................................... 291
25.2. Overview.................................................................................................................................. 291
25.3. Clock Generation......................................................................................................................291
25.4. SPI Data Modes and Timing.....................................................................................................292
25.5. Frame Formats.........................................................................................................................292
25.6. Data Transfer............................................................................................................................294
25.7. AVR USART MSPIM vs. AVR SPI............................................................................................295
25.8. Register Description................................................................................................................. 296
26. TWI - Two-Wire Serial Interface............................................................................ 297
26.1. Features................................................................................................................................... 297
26.2. Two-Wire Serial Interface Bus Definition..................................................................................297
26.3. Data Transfer and Frame Format.............................................................................................298
26.4. Multi-Master Bus Systems, Arbitration, and Synchronization...................................................301
26.5. Overview of the TWI Module.................................................................................................... 303
26.6. Using the TWI...........................................................................................................................305
26.7. Transmission Modes................................................................................................................ 308
26.8. Multi-Master Systems and Arbitration...................................................................................... 326
26.9. Register Description................................................................................................................. 327
27. AC - Analog Comparator....................................................................................... 335
27.1. Overview.................................................................................................................................. 335
27.2. Analog Comparator Multiplexed Input...................................................................................... 335
27.3. Register Description................................................................................................................. 336
ATmega328PB
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40001906C-page 6