The ICD can run the program from the target CPU step by step, can set a hardware breakpoint or can even update the target firmware without removing it from the circuit. All these useful features are based on the hardware support for In Circuit Programming and Debugging of the PIC16F87X family.
The whole circuit is built on a rectangular peace of breadboard (3.5”X2” – RadioShack 276-147). Because the breadboard is larger I have used the rest of it for the Target Demo Board. The original Manual and schematic diagram of the ICD can be found on the Microchip web site at www.microchip.com as document DS51184 together with ETN #20 and ETN #21 notes. Reading these documents is a must in order to get familiar with the ICD.
The main goal of this project was to maintain the compatibility and the original features of the ICD. The power supply is built using a Wall wart adapter (8-12V) and a 7805 linear regulator. The Target Demo Board is powered from the same 7805. If it is necessary all this arrangement can be reversed and the ICD powered with 5V from the Target Board. Diode CR1 protects the circuit against reversed polarity voltage from the Wall wart adapter. The ICD generates the -/+12V and 13V voltages internally from tthe +5V power line.
The first step is to build the +5V Power Supply and test it as it is shown in Figure 1. I have used a small heat radiator for the 7805 because the Target Board is also using the +5V voltage generated by this IC. The Red LED indicates that power is ON and the Green LED indicate the presence of the +5V voltage. The voltage from the green LED is also used as Reference by the A/D so. Consequently, it is very important that its value be ~1.94V. If the voltage is different the ICD will give you wrong readings for the VDD and VPP and an error will occur. The secret is to select a green LED, which has the right voltage drop. I have used a bicolor LED, successfully. At this step is quite easy to measure the voltage over the green LED and to select the right one. Also make sure that the 7805 work properly and test the +5V supply.
Visit Here for more.