PIC18FXXQ83/84 PIC18FXXQ83/84 Family Programming Specification Introduction This programming specification describes a SPI-based programming method for the PIC18FXXQ83/84 family of microcontrollers. Programming Algorithms describes the programming commands, programming algorithms and electrical specifications used in that particular programming method. APPENDIX B contains individual part numbers, device identification and checksum values, pinout and packaging information, and Configuration Words. Important: This is a SPI-compliant programming method with 8-bit commands. The low-voltage entry code is now 32 clocks and MSb first, unlike earlier PIC18 devices, which had 33 clocks and LSb first. Programming Specification DS40002137B-page 1 2019 Microchip Technology Inc. PIC18FXXQ83/84 Table of Contents Introduction.....................................................................................................................................................1 1. Overview................................................................................................................................................. 4 1.1. Programming Data Flow...............................................................................................................4 1.2. Pin Utilization................................................................................................................................4 1.3. Hardware Requirements.............................................................................................................. 4 1.4. Write and/or Erase Section.......................................................................................................... 5 2. Memory Map........................................................................................................................................... 6 2.1. User ID Location...........................................................................................................................7 2.2. Device/Revision ID.......................................................................................................................7 2.3. Device Configuration Information (DCI)....................................................................................... 7 2.4. Configuration Bytes......................................................................................................................7 2.5. DEVICE ID .................................................................................................................................. 9 2.6. REVISION ID .............................................................................................................................10 3. Programming Algorithms.......................................................................................................................11 3.1. Program/Verify Mode..................................................................................................................11 3.2. Programming Algorithms............................................................................................................18 3.3. Code Protection..........................................................................................................................23 3.4. Hex File Usage...........................................................................................................................23 3.5. CRC Checksum Computation.................................................................................................... 24 4. Electrical Specifications........................................................................................................................ 25 5. APPENDIX A: Revision History.............................................................................................................27 6. APPENDIX B.........................................................................................................................................28 6.1. CONFIG1 .................................................................................................................................. 29 6.2. CONFIG2 .................................................................................................................................. 30 6.3. CONFIG3................................................................................................................................... 31 6.4. CONFIG4................................................................................................................................... 32 6.5. CONFIG5................................................................................................................................... 33 6.6. CONFIG6................................................................................................................................... 34 6.7. CONFIG7................................................................................................................................... 35 6.8. CONFIG8................................................................................................................................... 36 6.9. CONFIG9................................................................................................................................... 37 6.10. CONFIG10................................................................................................................................. 38 6.11. CONFIG11..................................................................................................................................39 6.12. CRC Boot Polynomial.................................................................................................................41 6.13. CRC Boot Seed..........................................................................................................................42 6.14. CRC Boot Expected Value......................................................................................................... 43 6.15. CRC Polynomial.........................................................................................................................44 6.16. CRC Seed.................................................................................................................................. 45 6.17. CRC Expected Value..................................................................................................................46 The Microchip Website.................................................................................................................................47 DS40002137B-page 2 Programming Specification 2019 Microchip Technology Inc.