PICKIT 2 is simple but powerfull programmer/debugger for Microchip microcontrollers. First firmware/software version was able to debug only one type of microcontrollers, but currently (May 2008) compatibility list is nearly as reach as for ICD2. With latest software package new gadgets were added: simple 3-channel logic analyzer and UART console. Price of original device is also very low.
Scheme I used to build my PICKIT 2 clone is simplified, some parts are changed
to more popular types, but it should have full capabilities of original device.
PICKIT2 scheme (pdf)
Scheme + PCB (Eagle Light)
PCB is optimized for KM 78 case.
- After opening .brd file ground plane probably will not be visible - you will see only cut-off polygon (dotted line). Enter "ratsnest" in command line to generate ground plane.
- To get a printout suitable for PCB etching click View, Display/Hide layers and select (only) layers: Bottom, Pads, Vias, Dimension, Holes, centerDrill.
- Software and firmware is available at Microchip website. Search for "PICkit 2 v2.55.01 Setup B.zip" or similar archive. Hex file will be copied to application directory. To load firmware for the first time you will need another programmer with ICSP plug, i.e. COM84, connect it to ICSP connecter at the PCB center. Later firmware upgrades will use USB bootloader, so you will probably not need another programmer later.
- 2008.10.24 Corrected swapped A0 and A2 address pins of EEPROM IC1 (thanks to Achira)
- LM358 is not a rail-to-rail operational amplifier and if you are experiencing problem vith voltage calibration try to replace it with preferably MCP6002 or similar,
- target circuit can not draw more than 25 mA; if I try to debug PIC18F4550 with USB on, high core clock, only one LED connected without external power supply I get message "PK2Error 0024 PICkit2 was unable to establish Vdd on the target. (Attempted 5.00V - Read 0.00V),"
- to debug another circuit I had to configure fusebits (configuration bits) manually in source code (watchdog OFF, LVP OFF); with default fusebits or when I let MPLAB PICKIT 2 plugin to change them debugging failed with message "PK2Error 0028 Unable to enter debug mode" (example for PIC18F2550).
With new avrdude version (tested 6.1) pickit 2 may be used with AVR microcontrollers. Required connection scheme is available in avrdude instruction:
[AVR (pin for "STK200" connector)] [PICkit2] RST (5) VPP/MCLR (1) VDD (2) separate power supply recommended GND (8, 10) GND (3) MISO (9) PGD (4) SCLK (7) PDC (5) MOSI (1) AUX (6)
Programming speed is lower that e.g. with USB, but still acceptable, especially if
pickit 2 would be treated as backup programmer (both reading and writing ATmega8 FLASH at ~1kB/s).
PICkit2 to AVR 10 pin ("STK200") socket adapter
PIC, PICkit2, ICD2 and others are registered trademarks of Microchip, Inc.