|
HOODMICRO
Microcontroller Development Kit
|
HOODMICRO Shopping Cart K9spud.com |
|
How does the PIC Programmer work?
When the PC drives the DTR signal line to a negative voltage, the 13V zener diode is forward biased. Current flows from GND through the zener diode, charging the 470uF capacitor (C1). The 10K resistor (R11) limits the current into C1 so that we don't stress the PC's serial port (usually current limited anyway on most PCs).
Once the capacitor is fully charged and the user tells the programming software to begin, the PC drives the DTR signal line to a positive voltage.
At this point, the capacitor C1 has double the voltage when measured from GND to VPP (charge pump). The zener diode is now reverse biased and acts as a voltage regulator, preventing the voltage on MCLR from going above 13V. The resistor R11 now limits the current coming out of the capacitor so that we don't drain all of our excess charge through the zener diode immediately.
Since the PIC chip consumes very little current, this charge pumped capacitor design will provide high voltage on the MCLR line for several seconds before completely draining. As long as we can FLASH the PIC chip before the MCLR line falls below 8.5V for the PIC12F629 (10V for the PIC12F683), we will be successful.
Even if we can not FLASH the entire chip during one capacitor charge, we could briefly stop the programming sequence to recharge the capacitor and then re-enter program mode to finish programming the remaining memory. This is unnecessary for current PIC12F6XX chips, but could be necessary for large memory chips, such as the dsPIC. Currently, WinPic and PiKdev do not implement such an algorithm, but since both programs are open source, this could be easily implemented in the future.
I have been using this circuit and it works very well for me, even better than the old JDM PIC Programmer that I used to use. This integrated PIC Programmer requires very few components, and the few components used are very cheap.
Historic Notes
This design is similiar to Luigi Rizzo's old serial port programmer that he made somewhere around 1996-1998. Of course, 15V would be out of spec for our current day PIC12F6XX chips, so building his programmer verbatim would not be ideal today. Also, his design lets all charge above 15V immediately drain through the 15V zener diode. This shortens the amount of time the programming cycle has before the charge pump capacitor will drop below the minimum VPP programming voltage specification.
In 2004, FENG3 published his RCD Programmer, which is another similar design. However, in some ways, this programmer seems like a bit of a step backwards from Luigi Rizzo's older design (no mechanism for putting the PIC in execute mode, for example).