Microchip PICkit 3 Programmer/Debugger Description The PICkit 3 programmer/debugger is a simple, low-cost in-circuit debugger that is controlled by a PC running MPLAB IDE (v8.20 or greater) software on a Windows platform. The PICkit 3 programmer/debugger is an integral part of the development engineer s toolsuite. The application usage can vary from software development to hardware integration. The PICkit 3 programmer/debugger is a debugger system used for hardware and software development of Microchip PIC microcontrollers (MCUs) and dspic Digital Signal Controllers (DSCs) that are based on In-Circuit Serial Programming (ICSP ) and Enhanced In-Circuit Serial Programming 2-wire serial interfaces. In addition to Page 1 of 5 pages
debugger functions, the PICkit 3 programmer/debugger system also may be used as a development programmer. Specifications USB (Full speed 12 Mbits/s interface to host PC) Real-time execution MPLAB IDE compatible (free copy included) Built-in over-voltage/short circuit monitor Firmware upgradeable from PC/web download Totally enclosed Supports low voltage to 2.0 volts (2.0v to 6.0v range) Diagnostic LEDs (power, busy, error) Read/write program and data memory of microcontroller Erase of program memory space with verification Freeze-peripherals at breakpoint Program up to 512K byte flash with the Programmer-to-Go Header Information Status LEDs 1. Power (green) Power is supplied to the PICkit 3 via the USB port. 2. Active (blue) The PICkit 3 has connection to the PC USB port and the communication link is active. 3. Status: Ready (yellow-green) The PICkit 3 is busy with a function in progress, such as programming. Busy (red) The PICkit 3 has encountered an error PICkit 3 vs PICkit 2 If you are a beginner in PIC programming and will only use earlier PIC microcontrollers, PICkit 2 is a better choice for you. However if you going to stick to PIC programming, choose PICkit 3 for it Page 2 of 5 pages
supports the latest PIC microcontrollers from microchip (pic32s). All PIC microcontrollers supported in PICkit 2 are also supported in PICkit 3. How to Use: 1. Follow the connections shown below from PICkit 3 pinout to your PIC microcontroller. However leave pin 6 not connected. 2. Plug-in the USB mini on PICkit 3 then connect it to your USB port on PC. 3. Open PICkit 3 programmer software which can be downloaded at microchip s website (http://www.microchip.com/programmers). 4. Select the device or microcontroller that you are using. 5. Click Tools tab then select Check Communication: Before proceeding to step 6, be sure PICkit 3 programmer is properly detected on your PC. 6. Click File, select Import Hex then browse the hex file you want to upload to the PIC: Page 3 of 5 pages
7. Finally, Click. Sample Program What you need: PIC16F877a MPLab ver 8.20 or higher PICkit 3 Programmer/Debugger Connecting Wires 10kΩ Resistor 20MHz Crystal Oscillator 1kΩ Resistor Code list p=16f877a ; list directive to define processor #include "p16f877a.inc" ; processor specific variable definitions CONFIG 0x3D71 count1 EQU count2 EQU 0x20 0x21 bsf STATUS, RP0 ;switch to bank 1 movlw.0 movwf TRISB ;set PORTC to output bcf STATUS, RP0 ;switch to bank 0 loop movlw.50 ;main loop movwf count2 bsf PORTB, 7 call shortdelay bcf PORTB, 7 movlw.50 movwf count2 call shortdelay goto loop ;endless loop shortdelay movlw.250 movwf count1 shortdelay1 decfsz count1 goto shortdelay1 decfsz count2 goto shortdelay return END Page 4 of 5 pages
How to use the code: 1. Open MPLab IDE. 2. Click (New File) 3. Paste the code included in this document. 4. Click (Save) and put.asm extension. 5. Finally, go to Project menu and select Quickbuild filename.asm. Wiring Diagram Page 5 of 5 pages
Actual Setup Few Tips We recommend that before uploading your program code to the PIC, make sure the program is functioning. By using MPLab Sim which is included in MPLab IDE, you can check if the program flow is working. A better choice is Proteus from Labcenter Electronics (http://www.labcenter.com) which lets you simulate properly with schematic and animation. Page 6 of 5 pages