Updated: 02.09.06

Main -> Tech -> PICmicro® -> Apps -> El Cheapo

El Cheapo PICmicro Programmer

PICmicro MCUs Supported by the El Cheapo:

  • PIC12C50x (x=8/9)

  • PIC12C67x (x=1/2/3/4)

  • PIC16C505

  • PIC16C55x (x=4/6/8)

  • PIC16C6x (x=1/2/3/4/5/6/7)

  • PIC16C62x (x=0/1/2)

  • PIC16C642

  • PIC16C662

  • PIC16C7x (x=1/2/3/4/6/7)

  • PIC16C71x (x=0/1/2)

  • PIC16C77x (x=3/4)

  • PIC16F62x (x=7/8)

  • PIC16F7x (x=2/3/4/6/7)

  • PIC16C84

  • PIC16F84

  • PIC16F84A

  • PIC16F87x (x=0/1/2/3/4/6/7)

El Cheapo Programmer Prototype

Download:

This project was begun as a response to the need for a simple and inexpensive PIC16F84 Programmer. The circuit shown here can be built in an hour or so using parts that are commonly available. The software that runs the programmer is written to copy a .hex file into the PICMicro directly with very few options. In terms of speed, the programming operation takes two or three times longer than the fastest programming algorithms out there, but it is very reliable.

The time to program a PIC16F627 with 1K of code should be about 15 seconds.

Programming and Customizing PICmicro® Microcontrollers comes with an El Cheapo programmer PCB to allow you to very easily build your own Programmer quite easily. The circuit used on the PCB is a bit different than the current homebuild circuit, but the software will work on both circuits.

To make it easier for people to work with the El Cheapo programmer, I have decided to combine software to control the homebuilt version with the PCB that comes with Programming and Customizing PICmicro® Microcontrollers. With version 0.80, I have changed the design of the programmer to use a 74LS05 instead of some discrete transistors and resistors to provide the interface. This updated interface should be more reliable and should work on every parallel port built.

I am no longer supporting an MS-DOS command line version of the software. The reason for this was to keep the number of hardware versions that were supported to a minimum. Due to the obsolence of the 2N2106A and the difficulty some people have with procuring the 2N7000, I will only be supporting the home build circuitry shown below. The Windows interface software has a graphical interface to help you test and debug your programmer before you attempt to start programming parts.

Future planned upgrades includes being able to see/control configuration fuses as well as program PIC18C/Fxx2 part numbers.


Homebuild Version

The circuit used for the homebuilt El Cheapo is:

Click on Schematic for a Larger/Easier to Read Version

The homebuild circuit is at a later version than the one used for the PCB provided with Programming and Customizing PICmicro® Microcontrollers. This circuit is a result of working through the problems people have had with their programmers and unique PC/printer combinations. This circuit should work with every parallel port available on PCs (if yours doesn't, I would really like to hear from you).

The Bill of Material for the home built El Cheapo is:
Part Description
U1 78L08 +8 Volt Regulator
U2 Programming socket for PICmicro. Note that this socket and the pin connections will be different depending on the PICmicro MCU that you want to program.
U3 74LS05 Hex Inverter with Open Collector Outputs
Q1 2N3906 PNP Bipolar Transistor
CR1 5.1 Volt, 1/2 Watt Zener Diode
CR2 1N914 or any small-signal Silicon diode
CR3 LED - Any color
R1 180 Ohm, 1 Watt Resistor
R2 - R8 10K, 1/4 Watt Resistors
R9 2.2K, 1/4 Watt Resistor
C1 10 uF, 35 Volt Electrolytic Capacitor
C2 - C3 0.01 uF Capacitor (Any Type)
J1 Power Connector (2.5 mm Power Plug recommended)
J2 DB-25 FEMALE Connector or 36 Pin Centronics Female Connector
Misc. Prototyping Card, Wire, Solder, 15+ Volt AC/DC Power Supply with 2.5 mm Power Plug Output

My Prototype was built on a piece of FR4 prototyping board using "point to point" wiring.

Also with this circuit, you will require a 14+ Volt AC/DC Power Supply ("Wall Wart") and a DB-25 Male to DB-25 Male "Parallel Transfer" or "Switchbox" Cable.

The most common mistakes made by people building the circuit are:


PCB Version

There are no plans currently to change the PCB that comes with Programming and Customizing PICmicro® Microcontrollers, but I will keep updating the software to work with new parts as well as modifying the circuit to make it as reliable as possible. When the book was originally published, the El Cheapo PCB that came with the book has reference designators that do not match the reference designators that were listed in the book. To help you through the transition, I have updated the El Cheapo Windows Interface and have provided a new Bill of Material that uses the reference designators that are present on the PCB.

The corrected Bill of Materials for the book version of El Cheapo is:
Part Description/Comments
U1 78L12 +12 Volt, 100 mA Linear Voltage Regulator
U2 18 Pin 0.300" DIP Socket. 18 Pin "ZIF" Socket Recommended
U3 14 Pin 0.300" DIP Socket. 18 Pin "ZIF" Socket Recommended
P28 14 Pin 0.100" Socket Strip. This is one half of a 28 Pin DIP Socket cut down as described in the Text
P40 40 Pin 0.600" DIP Socket. This is a 40 Pin DIP Socket cut down as described in the Text
Q1 2N7000 N-Channel MOSFET Transistor
Q2 2N3906 PNP Bipolar Transistor
CR1 5.1 Volt, 1/2 Watt Zener Diode
CR2 - CR4 1N914 Small Signal Silicon Diode. Any Small Signal Silicon Diode can be used for this application
CR5 Deleted - See Comments Below
R1 220W, 1/2 Watt Resistor. Note that this resistor is rated at 1/2 Watt
R2, R6 1 K, 1/4 Watt Resistors. 10K Marked on the PCB - the Programmer works best with this value for the two Resistors
R3 - R4 Deleted - See Comments
R5 10K, 1/4 Watt Resistor
C1 10 uF, 35 Volt Electrolytic Capacitor
C2, C4 0.1 uF, 16 Volt Tantalum Capacitors
C3 Deleted - See Comments
J1 2.5 mm PCB Mount Power Socket. CUI Stack Part Number PH-202B (Digi-Key Part Number CP-202B-ND)
J2 25 Pin Female 90 Degree PCB Mount D-Shell Connector. Note - Male Connector CANNOT be used
N/A Four Rubberized "Feet" for PCB. This is Optional, but Recommended to avoid the El Cheapo from scratching table
Parallel Cable 6'/10' 25 Pin D-Shell Male to Male "Parallel Transfer Cable". May be labled "Interlink"
Power Supply 14+ Volt, 300+ mA AC/DC ("Wall Wart") Power Supply with 2.5 mm Power Plug output
Miscellaneous PICmicro® microcontrollers, Controlling PC, EPROM Eraser
Tools Digital Multi-Meter, Soldering Iron, Solder, Clippers, Needle Nose Pliers, Flat Bladed Screwdriver, Magnifying Glass

DIY Electronics has made a kit of parts available for the PCB El Cheapo (this is kit number "161"). This kit is very inexpensive (less than six dollars), but ordering one from DIY Electronics in Hong Kong will more than triple this price. There are a number of retailers around the world that has the kit available. You should be able to find this information with a Google search.


To install the new El Cheapo Windows Interface software, follow the steps listed below:

  1. If you have already installed an earlier version (ie the Version Number is less than "0.84") of the El Cheapo Windows Interface, remove it by:
  2. Click on elch084.zip and "open" it rather than "save" it. Using "WinZIP" (if you do not have it active, download it before starting this process), "extract" the three files and save them in a temporary folder.
  3. Click on "setup.exe" in the temporary folder and the "El Cheapo Windows Interface Version 0.84" will be installed.
  4. You are now ready to work with the El Cheapo software that uses the same reference designators as the PCB that comes with the book or you can build it yourself using the circuit shown above.
  5. For Windows NT/2000 users that are having trouble installing the software (prompted to overwrite a DLL and then told that the DLL cannot be installed) download and execute the "vbrun60sp4.exe" file found at:

    http://support.microsoft.com/support/kb/articles/Q235/4/20.ASP

    These are the Application Run Time Utilities and will update the needed DLLs to the latest level before the application is loaded (and avoid the overwrite messages and errors).

  6. The El Cheapo Windows Interface will install itself into the "C:\\El Cheapo Version x.xx" where "x.xx" is the software's version number. In the next section, I have outlined the differences between the the different versions.

Plananed updates to the El Cheapo Windows Interface software

  1. Use the "QueryPerformance" Frequency and Counter functions for timing delays
  2. Add Configuration Fuse information/updating

Updates to the El Cheapo Windows Interface software

Version 0.84:

  1. Method of accessing graphics and data files changed to allow proper execution under Operating Systems installed on drives other than "C:".

Version 0.83:

  1. Used to find problems with Non-"C: Drive" Implementation
  2. NOT RELEASED

Version 0.82:

  1. Fixed incorrect Ground notation for PIC16C505
  2. Fixed invalid part numbers
  3. Made sure "PICmicro MCU" was used everywhere
  4. Corrected colors for Windows/XP
  5. Correct Graphic Errors for home built version
  6. Put in "App.Path" & "\" & FileName everywhere to fix problems with people that load Windows in somthing other than the "C" drive
  7. Updated assembly instructions for home built
  8. Put in support for PIC16F7x
  9. "PollStartTimer" was not disabled before Programming Operation
  10. Book PCB voltage ranges tightened for PIC16F7x

Version 0.81:

  1. Put in new home build circuitry graphics/code
  2. Put in code to handle 32 bit hex files
  3. Separated programming code for different PICmicro Types to allow for addition of PIC16F7x

Version 0.80:

  1. Combine New Homebuild Circuit wtih book PCB Version
  2. New Registry Entry created to specify circuit type
  3. Fixed "SetPart" to update Text1.Text with correct Part Type
  4. Added Picture of Homebuilt prototypes in "About"
  5. Fixed Address problem when error Configuration Fuses returned

Version 0.77:

  1. Modified Default File Determination code in "Form_Load" (this is a developer issue).
  2. "Setup" File of Installation Package modified to create and write to:
    "C:\Program Files\El Cheapo 0.77" instead of default "C:\Program Files\Project1"

Updates to Version 0.76 (which was not released):

  1. Fixed problems with ID Bit Programming.
  2. During Reads, modified code so Data bit is "High" - this is to facillitate active driver versions of the application.

Updates to Version 0.75 (which was not released):

  1. Fix to Flash Delete Code - 0.74 had problems with PIC16F84A.
  2. Fixed Error Message for Step 6 (no longer references RC Delay Circuitry).
  3. Added PIC16F62x parts to list of programmable devices.

Updates to Version 0.74:

  1. Recreated with correct source files for WinZip.

Updates to Version 0.73:

  1. Fixed incorrect error message in Build/Test for Step 6.

Updates to Version 0.72:

  1. Fixed Timer Problem that continually toggled the data line during "Build/Test" Step 6 in some PCs.

Updates to Version 0.71:

  1. Removed debug code that was left in Version 0.70 to allow me to use the local directory.

Updates to Version 0.70:

  1. Use the Data Line for Checking the Connection. The RC Delay line (which was previously used for this function is no longer used - this eliminates the need for you to populate R3, R4, C3 and CR5 as well as eliminates the problems a number of people were having with the software.
  2. With the RC Delay Network no longer used, I used the "Sleep" WinAPI and the PC's built in timer for implementing the programming delays. This resulted in substantially faster programming times (a full PIC16F84A in sixteen seconds).
  3. The Data/Graphic Files are now stored in the Same Directory as the Application, allowing users with multiple operating systems installed on their PCs to download the application without any issues.
  4. The PC's Registry is used for saving the current data selection information.
  5. I changed the Flash PICmicro erase code to Use Nigel Goodwin's code.
  6. You will see I have color coded the bargraph operations and have put in more explicit messages as to the operation status.

Updates to Version 0.60:

  1. New layout from version presented in Programming and Customizing PICmicro® Microcontrollers.

Initial release, Version 0.50:

  1. Layout shown in Programming and Customizing PICmicro® Microcontrollers.