Datasheet

Table Of Contents
23. USART - Universal Synchronous and Asynchronous serial Receiver and
Transmitter.............................................................................................................190
23.1. Features................................................................................................................................... 190
23.2. Overview...................................................................................................................................190
23.3. Clock Generation......................................................................................................................192
23.4. Frame Formats.........................................................................................................................195
23.5. USART Initialization..................................................................................................................196
23.6. Data Transmission – The USART Transmitter......................................................................... 197
23.7. Data Reception – The USART Receiver.................................................................................. 199
23.8. Asynchronous Data Reception.................................................................................................203
23.9. Multi-Processor Communication Mode.....................................................................................205
23.10. Accessing UBRRH/UCSRC Registers.....................................................................................206
23.11. Register Description................................................................................................................. 208
23.12. Examples of Baud Rate Setting............................................................................................... 217
24. TWI - Two-wire Serial Interface............................................................................. 221
24.1. Features................................................................................................................................... 221
24.2. Overview...................................................................................................................................221
24.3. Two-Wire Serial Interface Bus Definition..................................................................................223
24.4. Data Transfer and Frame Format.............................................................................................224
24.5. Multi-master Bus Systems, Arbitration and Synchronization....................................................227
24.6. Using the TWI...........................................................................................................................228
24.7. Multi-master Systems and Arbitration.......................................................................................245
24.8. Register Description................................................................................................................. 246
25. AC - Analog Comparator....................................................................................... 253
25.1. Overview...................................................................................................................................253
25.2. Analog Comparator Multiplexed Input...................................................................................... 253
25.3. Register Description................................................................................................................. 254
26. ADC - Analog to Digital Converter.........................................................................258
26.1. Features................................................................................................................................... 258
26.2. Overview...................................................................................................................................258
26.3. Starting a Conversion...............................................................................................................260
26.4. Prescaling and Conversion Timing...........................................................................................261
26.5. Changing Channel or Reference Selection.............................................................................. 264
26.6. ADC Noise Canceler................................................................................................................ 265
26.7. ADC Conversion Result............................................................................................................269
26.8. Register Description................................................................................................................. 271
27. JTAG Interface and On-chip Debug System..........................................................282
27.1. Features................................................................................................................................... 282
27.2. Overview...................................................................................................................................282
27.3. TAP – Test Access Port............................................................................................................ 283
27.4. TAP Controller.......................................................................................................................... 284
27.5. Using the Boundary-scan Chain...............................................................................................285
27.6. Using the On-chip Debug System............................................................................................ 285
27.7. On-chip Debug Specific JTAG Instructions.............................................................................. 286
Atmel ATmega32A [DATASHEET]
Atmel-8155I-ATmega32A_Datasheet_Complete-08/2016
6