Close
0%
0%

Microchip PIC Arduino based programmer

I love to program programmers. Yo dawg...

Similar projects worth following
This is more software than hardware project running on vanilla Arduino, but for sake of completeness I'm going to build simple dedicated hardware instead.
More to come.

For #Micro progmeter project I want to deliver full set of open-source materials, but it would be shame if folks trying to replicate the project would have to buy another programmer to flash the PIC MCU, so I decided to do a little bit of brain stretching and implement PIC16F1xxx programmer with... Arduino, just because it is low cost and available platform.

Together with SDCC compiler this serves as completely open-source basis for PIC16F1xxx and similar projects.

The current project status: Programmer working, sources need cleanup.

SUPPORTED DEVICE LIST - see readme at github

  • 1 × ATmega328P Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 1 × Crystal 16MHz
  • 1 × FT232RL Semiconductors and Integrated Circuits / Misc. Semiconductors and Integrated Circuits
  • 2 × LED 0805
  • 6 × 470Ohm resistor

View all 9 components

  • version 0.99

    jaromir.sukuba06/28/2018 at 11:17 0 comments

    Support for new PIC18FxxQ10 is added (by the way, its FLASH is programmed in different way than most of the other new PIC16 and PIC18 devices, thank you Microchip for another programming algorithm to implement), now it's 439 devices in total. It looks like there are no other LVP programmable 8-bit PIC devices, so probably I can polish it and release version 1.00 soon.

  • version 0.98

    jaromir.sukuba06/19/2018 at 13:13 0 comments

    As usual, on github.

    I added some new devices - PIC16F184xx, PIC18FxxK40 and PIC18FxxK42, support list having 433 entries by now.

    Also, programming speed for some devices is increased.

  • version 0.97

    jaromir.sukuba06/18/2018 at 11:59 1 comment

    60 new devices from PIC16F153xx, PIC16F183xx, PIC16F188xx and PIC16F19xxx added, resulting in support for 379 devices in total. For a moment, I'm adding support for new MCUs faster than Microchip can develop them, neat!

    I tested 5 new ones, resulting in 52 MCU types tested.

  • version 0.96

    jaromir.sukuba06/17/2018 at 23:11 0 comments

    After nearly two years, I refreshed this project again.

    Apparently, Microchip introduced new programming specification for newer PIC devices, like PIC16F1xxxx and PIC18FxxK20 and PIC18FxxK22. The old format was LSB first, either with mix of 8/14 bit long words (for PIC16Fxxx) or 8-bit long words, but a lot of direct instructions entering (PIC18). This seems to be unified now (see the famous XKCD comics) with MSB-first and 8-bits only words. Nice initiative, only if there were already a few different formats among PIC devices.

    Honestly, I was too lazy to implement it, but there is already quite a few "new format" devices in the wild, so I finally got myself to add it to pp3 programmer, so here you go. Only PIC16F188xx are added, but more will follow.

  • pics of PICs, version 0.95

    jaromir.sukuba09/16/2016 at 11:15 1 comment

    Today I made some more progress. I added support for more PIC18FxxKxx devices, so the total supported devices count is 305. There will not be much more of them.

    I tested a few new ones, including PICs in TQFP package. Unlike for DIP packages, breadboard and wires are not enough, so I had to use TQFP adapter I made few years ago for PIC24 and PIC32 series, but with single cut trace it works for PIC18 too.

    There is nothing more than micro and decoupling caps. By the way - JS09 really means year 2009. The time flies.

    For this adapter I made simple testbench of perforated PCB.

    With this one I tested PIC18F66J15, 67K22 and 67J50, each on its own breakout.

    And this is gallery of all PIC devcies I programmed with this Arduino programmer. Every single MCU here has blink a LED program flashed. Much blinking power, very wow.

  • version 0.94 - PIC18FxxKxx CAN devices added

    jaromir.sukuba09/14/2016 at 16:42 0 comments

    In version 0.94 I added support for CAN devices like PIC18F25K80, 12 new in total. New firmware is released too.

    Everything is on github.

  • version 0.93

    jaromir.sukuba09/12/2016 at 09:28 0 comments

    I hunted a bug with programming PIC18F24J10, but finally I got it working - so version 0.93 is out.

    I ordered some more PIC18FxxJxx devices to test the programming protocol implementation. After tested, I'm going to do the final sources cleanup and release version 1.00.

    Files are on github, as usual.

  • Version 0.92 - major rework

    jaromir.sukuba09/09/2016 at 11:14 0 comments

    I reworked the MCU selection code. The if-then structure was OK for dozen of devices, but with more than 200 supported MCUs, it became messy. So I rewrote it into simple plain text file database with entries like

    # PP3 device database for version 0.92
    # 
    # name   flash page  ID  mask family_type
    # flash size and page size in bytes 1 WORD = 2 BYTES
    # 
    # PIC16 family
    16f1503   4096   32 2CE0 FFE0 CF_P16F_A
    16lf1503  4096   32 2DA0 FFE0 CF_P16F_A
    16f1507   4096   32 2D00 FFE0 CF_P16F_A
    16f1508   8192   32 2D20 FFE0 CF_P16F_A
    16f1509   16384  32 2D40 FFE0 CF_P16F_A
    16lf1507  4096   32 2DC0 FFE0 CF_P16F_A
    16lf1508  8192   32 2DE0 FFE0 CF_P16F_A
    16lf1509  16384  32 2E00 FFE0 CF_P16F_A
    16f1454   16384  64 3020 FFFF CF_P16F_A
    16f1455   16384  64 3021 FFFF CF_P16F_A
    ...
    ...
    so it is easy to edit (add new PIC devices or fix mistakes in existing) by hand without recompiling the code. The pp3 takes all the information about device to be programmed from here. The original source shrunk from 2700 to 900 lines of code.

    I also added 67 more PIC18FxxJxx devices and one PIC16F, so it supports 273 devices in total. At last, I tested support for another 7 devices, all of them working on a first try. I feel like time for 1.0 release is near.

    Everything is on github, as usual.

  • After 0.9 comes 0.91, obviously

    jaromir.sukuba09/06/2016 at 12:16 5 comments

    I decided to release version 0.91 - the previous should be 0.90, then.

    No matter what, I added some more devices - 205 devices supported in total.

    I also changed somehow serial port handling, resulting in higher programming speed, especially under windows. PIC16 programming algorithm got a bit more intelligence, resulting in faster programming.

    Before 1.00 release I'd like to rework the MCU type selection into table driven function instead of huge if-then-else behemoth and set support for all LVP ICSP-able 8-bit PIC devices.

    Everything is at github, as usual https://github.com/jaromir-sukuba/a-p-prog

  • Version 0.9 - 175 devices supported

    jaromir.sukuba09/05/2016 at 20:55 0 comments

    Oh here we go, version 0.9 - this means first "normal" release 1.0 is close.

    I added a lot of new devices, some new are tested. I fixed some bugs around serial port and hex file handling. The PIC name is now case non-sensitive. 175 devices is in support list in total.

    Everything is on github, as usual.

View all 24 project logs

Enjoy this project?

Share

Discussions

KSUdoubleE wrote 08/18/2017 at 17:09 point

Successfully programmed a PIC12LF1571 and PIC12LF1501, worked great.  Thanks!

  Are you sure? yes | no

jaromir.sukuba wrote 08/31/2016 at 13:27 point

@rmessino  The PIC type should be all lower case, like 16f1783, for current software version. Perhaps I should rewrite to accept both letter cases.

  Are you sure? yes | no

adilmalik_n wrote 12/26/2015 at 00:06 point

Can this work with higher end like the DSPIC33F's? ive got a diy dev board that im dying to program and have a PICKIT3 on order but its delayed due to Christmas (dont worry, its a clone).

  Are you sure? yes | no

jaromir.sukuba wrote 12/26/2015 at 14:18 point

Yes, dsPIC33F are technically possible. 

Speaking from memory, all 16- and 32-bit MCUs from Microchip are using low voltage on MCLR and serial key on PGC/PGD pair to enter programming mode (as well as newer 8-bits, like PIC16F1xx, like PIC18F1829 and some PIC18, for example PIC18F46K22 and similar).

On the other hand, there are dsPIC33 with 512kB of FLASH. Programming such as amount of data with this simple and really slow programmer would be pain in the ass. Bottleneck of data throughput here is simple polled firmware architecture and slow serial transfer - acceptable only for few kB of data for 8-bitters.

But it is good to know there is demand for other than PIC16F1xxx devices. I'll start thinking about how to improve the programming speed and scan through programming specs of PIC devcies to determine what types are possible to implement.

  Are you sure? yes | no

Connor Neal wrote 12/10/2015 at 23:37 point

Nice work! Did you hand solder the components?

  Are you sure? yes | no

jaromir.sukuba wrote 12/11/2015 at 09:26 point

Thanks. Yes, I soldered the parts by hand with my DIY soldering iron, leaded solder and cheap chinese flux.

  Are you sure? yes | no

rmessino wrote 08/31/2016 at 03:28 point

Hi first at all, thanks for your work, is great that you are doing. In the ither hand I run pp3 program today I am working with a seeduino board(atm328p) and a pic16lf1783 , I get a error "Unsupported CPU type '16F1783' This application has requested the Runtime to terminate it in an unPlease contact the application's support team for more information." Do you have any idea about?

  Are you sure? yes | no

Blecky wrote 12/07/2015 at 02:40 point

[verified: no design files missing]

  Are you sure? yes | no

alpha_ninja wrote 12/02/2015 at 00:42 point
This is your one-week reminder to upload design documents: https://hackaday.io/project/7813-the-square-inch-project/log/28566-design-deadline

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates