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.

18 thoughts on “ZEPPP : Zero External Parts PIC Programmer

  1. Opening port COM4…
    Waiting 2000 ms …
    Detecting connected device…
    — Device Name: 16f628a
    — Device ID: 0x0083
    — Device Revision: 0x0005
    Reading input Hex file: blink.HEX
    ERROR: Memory address 0x4010 is not mapped to any memory space in the selected device (16f628a)

    i use mikroc pro suit and i use that also the suit in it for make the hex file, can you help me please? I’m going to be crazy ahah

    Cheers, nicolò

    • Hello Nicolò,
      Can you share your blink.hex file? You can temporarily copy it to something like pastebin so I can take a look, but from the error it looks to me like you might be compiling your project for a different microcontroller. Check your settings in mikroC as well.

  2. First of all , This is one of the best Arduino codes I’ve ever seen, Total Respect .
    I haven’t tested This project yet.. But I have to say it looks freaking awesome.
    After I test and play around with ZEPPP I will attempt to add HVP function to it so I can program some of the old pic chips I have laying around.

    I will not touch The java CLI because I’m not very good at Java, I’ll probably add a whole other layer of code in python or c++ over your CLI and expand the cli functionality (maybe make a GUI).
    And add a 5->13 v booster on the hardware side (Yee I know it’s not ZERO EXTERNAL PARTS any more xD) But I’ll try to do my best to keep it super simple.

    Maybe I could have your Email so I can report you with my developments of this project ? That would be awesome
    Again, Thank you Sir, your project is amazing and So professionally codded.
    – Abdoo

    • Hi Abdoo,
      That’s the kindest comment I’ve received in a while. Thanks!
      Adding HVP to this project is an interesting idea, so I would love to see your progress with it. A GUI would also be a neat improvement. Could help it make it more convenient and user-friendly.
      You’ll find an email address on the main page (damnsoft.org) that you can use to contact me, or you send me a message on twitter (check the Twitter button up top).
      Alternatively you can fork the project on GitHub, and I guess I’ll be able to watch the progress on your fork.
      Thanks again for your interest in this project, and I look forward to seeing what you come up with, based on it.

  3. Hello, i have a problem:

    Opening port COM4…
    Waiting 2000 ms …
    Detecting connected device…
    — Device Name: 16f628a
    — Device ID: 0x0083
    — Device Revision: 0x0005
    Reading input Hex file: GRI.hex
    Connecting to ZEPPP interface…
    — Interface detected: ZEPPP 1.0.0 20180630
    Erasing CHIP Memory…
    INFO: Selected PIC does not support the CHIP Erase command. All memory areas will be erased separately.
    Erasing Configuration and Program Memory…
    Erasing Data Memory…
    Writing User IDs…
    INFO: Verification skipped. ZEPPP does read-back verification for word-based writes.
    Writing PGM Memory…
    INFO: Verification skipped. ZEPPP does read-back verification for word-based writes.
    Writing Data Memory…
    INFO: Verification skipped. ZEPPP does read-back verification for word-based writes.
    Writing Config Words…
    INFO: Your code seems to disable Low-Voltage Programming. This won’t be saved in PIC memory!
    INFO: Verification skipped. ZEPPP does read-back verification for word-based writes.
    That took 7009 ms
    Can you help me?

    • Hi Max,
      Well, you can ignore most of the INFO output that is just telling you that the device cannot read back the value it just wrote for verification purposes (which means you’d need to add a verify step yourself after the write operations, if you want the code to be verified). However, the worrying part is the “Your code seems to disable Low-Voltage Programming. This won’t be saved in PIC memory!” Warning. That message appears when you are disabling LVP in the CONFIG word in your HEX file, and it tells you that the configuration will most likely NOT be written to the device because of that flag (Which is not something ZEPPP enforces. I believe that’s the behavior I observed in my tests; The PIC will refuse to write that word because of the flag). Make sure the CONFIG word you are setting in your code is NOT disabling LVP.

  4. Hi, i used this project and it worked very well at the first attempt. Thank you very much for sharing it! I have a bit of a problem right now though because I need the LVP disabled when the programming is finished. Is there a way to achieve this?


    • Sorry for the late reply, for some reason your comment was flagged by the blog as possible spam :/

      Glad to hear this programmer worked for you, at least initially.
      In theory the CLI exists LVP mode and resets the PIC after it’s done with all the specified operations so the PIC should no longer be in LVP mode when it’s done running the operations.
      If you meant disabling LVP (so it can’t be programmed again in Low Voltage Mode) after it’s done, then I don’t think it’s possible. From what I remember the PIC will not write a configuration word that disables LVP when using LVP to program the device. You’d need to do that with an HVP programmer.
      Would love to hear more about your setup and your use case, though, as I’m not quite sure what you meant.

Leave a Reply

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