..................

PIC PROGRAMMER

Modified 01/07/06

This schematic is intended for demonstration purposes only.
It is offered "as-is". Use at your own risk.

More code and circuits are here.

Introduction

These units are very nice PIC programmers developed by microEngineerig Labs, Inc. They have a power connector, a 10-pin programming connector, and either a 9-pin RS232 connector or USB Type-B connector. All timing and programming is controlled by an on-board PIC microcontroller. The programmer's firmware may be easily upgraded from the PC. Commands and data are received from the PC at high rates. These programmers are never starved for data and will program a PIC as fast as Microchip specifications allow. Because it has a PIC as the basis it can drive up to 25mA to help overcome loading conditions associated with the RB6, RB7, and MCLR on the in-circuit-programming-port (ICSP) of the PIC being flashed. The microEngineering Serial Programmer has proved to be a robust programming platform for my projects.


Serial programmer photo sourced at Melabs web site.



USB programmer photo sourced at Melabs web site.


My hardware implementation

I housed the Serial Programmer in a small plastic box with a power supply, two ZIF sockets, and a reset pushbutton. The serial programmer board sits on top of the switcher power supply. The black RJ-12 (telephone) jack used for connection to the ICSP connector on my projects.

I recently removed the Serial Programmer's RS232 connector and installed a USB-to-Serial adapter (the "CP2102 Breakout Board" from Spark Fun Electronics) to enable connection to newer computers that increasingly tend to omit serial connectors. The $19.95 CP2102 board and free drivers configure the USB to be seen as a COM port by the Windows operating system. Since the CP2102 has TTL serial levels, not inverted RS-232 levels, I added two transistors and four resistors to do the necessary inversions. (My schematic includes the USB adapter, but the photos don't show it.)

microEngineering Labs advises against powering application hardware from their on-board 5V regulator, but it appears that the regulator is quite capable for powering a PIC during programming in the stand-alone ZIF socket. Hence my implementation routes the +5VDC to the two ZIF sockets but not to my ICSP connector.







One ZIF socket is for 28 and 40-pin PICs. The other is for 8, 14, and 18-pin PICs. A good alternative to building up a custom box such as mine is to buy the melabs "8 to 40" adapter (or their other adapters).







The reset button is used when the ICSP cable is connected. It's helpful during project debug when my project doesn't have a reset button of it's own. This is often the case when I use the Power Up Timer and the Brownout Detect features of the more recent PICs, and leave out any external means of reset. MCLR must be active, though. The 100 ohm resistor prevents a direct short to the programmer's electronics.

Certain PIC's such as the 16F628 need to have their PGM pins tied low during programming to ensure that Low Voltage Programming is disabled while programming with the Serial Programmer. The symptom of LVP issues during programming is a message box that pops up stating that there is a "programming error at address xxxx." Since the PGM pin is tri-stated during programming, it's therefore vulnerable to electrical noise. Both on-board ZIF sockets have the PGM pins tied to ground through a 1K resistor for this purpose, illustrated in the following part the schematic.



Full schematic.

If using the ICSP cable to program such parts in the application socket, you need to ensure that the PGM pin will be effectively pulled low. In some applications, you might be able to ground it directly. Other applications might require a 1K or 100K resistor, depending on what the pin is being used for.







meLabs Software

The software is well-designed and straightforward. It includes a command line interface so that the software can be invoked directly from the CCS Compiler and other programs.

I believe operating systems as far back as Win98 are officially supported.


Photo sourced at Melabs web site.






meLabs Support

Pleasant folks! Reponsive! Fast updates to add new devices! Great support!