Datasheet
PICkitâ„¢ 3 Debug Express
DS41370C-page iv © 2009 Microchip Technology Inc.
3.6 Lesson 6: Using PICkit 3 Debug Express .................................................... 37
3.6.1 Resources Reserved by the PICkit 3 Debug Express ...............................37
3.6.1.1 General Resources ....................................................................37
3.6.1.2 Program and Data Memory Resources .....................................37
3.6.2 Selecting PICkit 3 as a Debugger in the MPLAB IDE ................................38
3.6.3 Basic Debug Operations ............................................................................38
3.6.3.1 Halt .............................................................................................38
3.6.3.2 Step ............................................................................................39
3.6.3.3 Run ............................................................................................39
3.6.3.4 Reset ..........................................................................................39
3.6.4 Using Breakpoints ......................................................................................40
3.6.5 Watching Variables and Special Function Registers .................................43
3.7 Lesson 7: Analog-to-Digital Converter (ADC) .............................................. 45
3.7.1 PIC18F45K20 ADC Basics .......................................................................45
3.7.2 ADC Configuration and Operation .............................................................45
3.7.3 Exploring the Lesson 7 Source Code ........................................................48
3.7.4 Build and Run the Lesson 7 Code with PICkit 3 Debug Express ...............48
3.8 Lesson 8: Interrupts ...................................................................................... 49
3.8.1 PIC18FXXXX Interrupt Architecture ..........................................................49
3.8.2 Exploring the Lesson 8 Source Code ........................................................50
3.8.3 Build and Run the Lesson 8 Code with PICkit 3 Debug Express ...............53
3.9 Lesson 9: Internal Oscillator ......................................................................... 54
3.9.1 The Internal Oscillator Block .....................................................................54
3.9.2 Configuring the Internal Oscillator ..............................................................55
3.9.3 Exploring the Lesson 9 Source Code ........................................................57
3.9.4 Build and Run the Lesson 9 Code with PICkit 3 Debug Express ...............57
3.10 Lesson 10: Using Internal EEPROM .......................................................... 58
3.10.1 Reading a data byte from EEPROM .......................................................58
3.10.2 Writing a data byte to EEPROM ..............................................................59
3.10.3 Exploring the Lesson 10 Source Code ....................................................60
3.10.4 Build and Run the Lesson 10 Code with PICkit 3 Debug Express ...........60
3.11 Lesson 11: Program Memory Operations .................................................. 61
3.11.1 Erasing and Writing Flash Program Memory ...........................................63
3.11.2 Protecting Program Memory in the Configuration Bits. ............................65
3.11.3 Exploring the Lesson 11 Source Code with PICkit 3 Debug Express ......66
3.12 Lesson 12: Using the CCP Module PWM .................................................. 68
3.12.1 PWM Overview .......................................................................................68
3.12.2 Using the CCP Module ............................................................................68
3.12.3 Exploring the Lesson 12 Source Code ....................................................71
3.12.4 Build and Run the Lesson 12 Code with PICkit 3 Debug Express ...........72
Appendix A. Schematics