
25.4. Prescaling and Conversion Timing...........................................................................................307
25.5. Changing Channel or Reference Selection.............................................................................. 310
25.6. ADC Noise Canceler................................................................................................................ 312
25.7. ADC Conversion Result............................................................................................................316
25.8. Register Description................................................................................................................. 318
26. JTAG Interface and On-chip Debug System..........................................................328
26.1. Features................................................................................................................................... 328
26.2. Overview...................................................................................................................................328
26.3. TAP – Test Access Port............................................................................................................ 329
26.4. TAP Controller.......................................................................................................................... 330
26.5. Using the Boundary-scan Chain...............................................................................................331
26.6. Using the On-chip Debug System............................................................................................ 331
26.7. On-chip Debug Specific JTAG Instructions.............................................................................. 332
26.8. Using the JTAG Programming Capabilities.............................................................................. 332
26.9. Bibliography..............................................................................................................................333
26.10. IEEE 1149.1 (JTAG) Boundary-scan........................................................................................333
26.11. Data Registers..........................................................................................................................334
26.12. Boundry-scan Specific JTAG Instructions................................................................................ 335
26.13. Boundary-scan Chain...............................................................................................................337
26.14. ATmega164P Boundary-scan Order........................................................................................ 340
26.15. Boundary-scan Description Language Files............................................................................ 342
26.16. Register Description.................................................................................................................342
27. BTLDR - Boot Loader Support – Read-While-Write Self-Programming................ 347
27.1. Features................................................................................................................................... 347
27.2. Overview...................................................................................................................................347
27.3. Application and Boot Loader Flash Sections............................................................................347
27.4. Read-While-Write and No Read-While-Write Flash Sections...................................................348
27.5. Entering the Boot Loader Program...........................................................................................350
27.6. Boot Loader Lock Bits.............................................................................................................. 351
27.7. Addressing the Flash During Self-Programming...................................................................... 352
27.8. Self-Programming the Flash.....................................................................................................353
27.9. Register Description................................................................................................................. 361
28. MEMPROG- Memory Programming......................................................................364
28.1. Program And Data Memory Lock Bits...................................................................................... 364
28.2. Fuse Bits...................................................................................................................................365
28.3. Signature Bytes........................................................................................................................ 368
28.4. Calibration Byte........................................................................................................................ 368
28.5. Serial Number...........................................................................................................................368
28.6. Page Size................................................................................................................................. 368
28.7. Parallel Programming Parameters, Pin Mapping, and Commands..........................................369
28.8. Parallel Programming...............................................................................................................371
28.9. Serial Downloading...................................................................................................................378
28.10. Programming Via the JTAG Interface.......................................................................................383
29. Electrical Characteristics....................................................................................... 397
29.1. Absolute Maximum Ratings......................................................................................................397
Atmel ATmega164P/V [DATASHEET]
Atmel-42742B-ATmega164P/V_Datasheet_Complete-08/2016
8