ZEPPP : Zero External Parts PIC Programmer

A couple of months ago I was asked if I could prepare a sort of workshop on one of my favorite topics: ASM Programming for PIC microcontrollers, which I of course accepted on the spot.  Now, I wanted to include a couple of “hands-on” lab sessions in this workshop, and because of this, I needed a way for all attendants to actually work with real PICs that hopefully did not involve purchasing PIC-programming hardware in bulk for what is probably going to be a one-shot activity.

The Quest

Simple DIY programming circuits exists, and in fact, my first PIC programmer was a home-built “Enhanced” NOPPP (No-Parts PIC Programmer); a fully functional device that required only a couple of components (Not really “No-parts” but pretty close to it). The problem is that it used the PC parallel port (R.I.P), and required an external power supply. And this goes for pretty much every “classic” DIY PIC programming circuit; they all either require extra hardware or can no longer be used on current computers.

The main obstacle here is that PIC devices are normally programmed using HVP (High Voltage Programming), which involves using a voltage way above their regular operating level. This is part of the reasons they require additional hardware. In old designs this higher voltage was obtained normally from an external power supply or from highly-specific hacks that only worked on ports no longer available on PCs (*cough* RS232 *cough*). Modern designs use voltage-boosting circuitry, or still resort to external power.

But I know that several PICs support LVP (Low Voltage Programming) which means they can be programmed using only ~5V; greatly simplifying the required hardware. With this in mind I thought that it should be easy to make a cheap and “no-parts” (In the sense that requires no external components nor assembly) LVP PIC programmer using something like an Arduino.

Using Arduino also has many advantages; Compatible boards (especially “nano” and ” Pro mini”  variants) are not only widely available, but also quite cheap, and more than capable of handling all the handshake and 5V logic needed to program a PIC, with no extra components required. They are also quite popular, so chances are that any person interested in this project already has one.  They also connect to the computer via USB (well, a “comm” port managed by a USB-Serial chip, but still counts) so it should work for everyone with a computer manufactured after 1996.

More importantly, however, a bunch of Arduinos will still be useful to me after the workshop is over, and getting a dozen of them won’t be a problem.

Great, right?

Well, thing is…if you start looking for “Arduino PIC programmer” online, you’ll be greeted by a number of abandoned projects, solutions made for a family of PIC devices that are NOT compatible with the one I want to use, alternatives that require needless extra circuitry (like a custom Arduino shield or external power adapters … because HVP…duh), or slightly-related projects made for platforms so expensive that it doesn’t even make sense to even consider them an alternative for what I need (Yes, I’m talking about THAT one project that uses a RaspberryPi).

As none of the existent solutions worked for what I wanted, I decided to roll my own, focusing (at least initially) on the PIC I wanted to use for the workshop; The simple yet versatile PIC 16F628A.

Also, I thought this was a fun challenge to tackle and something I’d enjoy working on. I’ve done many tools for micro-controllers in the past, but this was my first dive into the hardware-specific side of the programming procedure.

The Result

Fast-forward through the couple of weekends several months working on this  (sorry, other projects got in the way), I’ve managed to make a firmware for Arduino boards that can program a handful of LVP-ready PICs using nothing but the Arduino board and a CLI (Command Line Interface) utility that communicates with it. The CLI was written in Java for portability, so it should work on Windows, Linux, OSX, etc.

Programming a PIC 16F628A with nothing but an Arduino nano and a PC.

It can currently program the following devices:

  • 16F87, 16F88
  • 16F627A, 16F628A, 16F648A
  • 16F873A, 16F874A, 16F876A, 16F877A.

More PIC devices can be added later I guess, but I reckon it won’t be a simple task; different families of microcontrollers support different programming commands and algorithms, and I’ve only implemented those supported by the microcontrollers above.

You can find both the firmware and the command line interface on my GitHub repo.


All the information to run this project can be found on the GitHub repo. And you can always run the command line utility without arguments to get a list of available parameters, but to further illustrate how truly “no external parts” this programmer is, this is how you would connect an Arduino Uno with ZEPPP to a 16F628A:

A 16F628A connected to an Arduino with ZEPPP

I’d say this is one of the “simplest” PIC programmers out there.

10 thoughts on “ZEPPP : Zero External Parts PIC Programmer

  1. Hi, always, when I try to run command, I get this:
    zeppp-cli -c COM4 -i .hex -p
    Opening port COM4…
    Detecting connected device…
    ERROR: Failed to Enter LVP Mode. No response from interface
    What should I do? Thank you for your answers.

    • Hi Bobes,
      Sorry for replying this late.
      I’ve seen this happening with Arduino boards that include a serial controller on board (like the Arduino Uno or Arduino Nano) because the serial chip resets the Arduino when a connection to your PC is established. In those instances you will need to specify a delay of at least 2 seconds in zeppp-cli before attempting to read or write to the PIC. You can do that by using the “-wait” switch immediately after the -c flag. For instance like this “-c COM3 -wait 2000 … “.

      If that doesn’t solve your problem, I’ll advise you to verify that the right pins are connected to the right ICSP signals of your target. There’s a table with the right pin connections for different PIC devices in the git repository: https://github.com/battlecoder/zeppp.

  2. Dear Sir.
    I have two questions (may be so foul, but I have thats doubts)
    In order to run zeppp-cli application
    1- which is the minimum version of JRE that must be installed ? ( jre-8.xxx)
    2- zepp-cli.jar has been tested in windows xp console ?, or it need run in win 7 or superior?,

    – i have a problem that involve jserialcomm.dll when i try to run in a laptop (a typical machine of school students) windows xp based

    Thank You by your time
    Best wishes

    • Hi Fanklin,
      Thanks for bringing this to my attention. ZEPPP-cli uses JSerialComm for the serial link to the board, and apparently the latest releases of that library only work with Windows 7 and up.
      However, my program doesn’t use any feature exclusive to the new versions of JSerialComm, so I downgraded to an older version, and now zeppp-cli is compatible with Windows XP.
      I have tested this on an XP machine running Java 1.8.0_131 and seems to work fine. You will find the re-compiled package in the GIT repository. Let me know if that works for you.

  3. Hi, i love the idea!! i’am trying to use your project but to programm a PIC 12f683, is there any mod for this? o could you help me?


    • Hi Juan,
      I just read some of the programming specifications for that device, and unfortunately it doesn’t seem to support the old LVP (Low Voltage Programming) mode. It seems to be from the family of devices that either require high voltage, or a handshake sequence to be performed over two pins to enter programming mode; and neither method is supported by this programmer, sorry.

    • Hi! If you are asking for the “non-A” variants, that’s a really good question. I remember I tried a couple of them at some point and don’t remember any issues… except for the PIC16F628 (non-A), that has a different memory protection scheme. But then again, I wonder if I really had 100% success with those parts. If I did, then why didn’t I add them to the compatibility list?. Did I forgot to add them? Did I skip them because they are no longer in production? I guess I’ll try to find some non-A parts again and repeat the tests and then I will update the post accordingly. Stay tuned!

      (But if you were asking for the PIC16F877A and the other processors from the PIC16F87xA family, yes, it works with them!)

Leave a Reply

Your email address will not be published. Required fields are marked *