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:

DEVICE  TESTED  DEVICE  TESTED
PIC12F1501  YES PIC18F26J11 YES
PIC12F1571      PIC18F26J13 
PIC12F1572  YES PIC18F26J50 YES
PIC12F1612  YES PIC18F26J53 
PIC12F1822  YES PIC18F26K22 YES
PIC12F1840  YES PIC18F26K50 
PIC12LF1501 YES PIC18F26k80 
PIC12LF1552 YES PIC18F27J13 
PIC12LF1571     PIC18F27J53 YES
PIC12LF1572     PIC18F43K22 
PIC12LF1612     PIC18F44J10 
PIC12LF1822     PIC18F44J11 
PIC12LF1840 YES PIC18F44J50 
PIC16F1454      PIC18F44K22 
PIC16F1455  YES PIC18F45J10 YES
PIC16F1459      PIC18F45J11 
PIC16F1503  YES PIC18F45J50 
PIC16F1507  YES PIC18F45K22 
PIC16F1508      PIC18F45K50 
PIC16F1509  YES PIC18F45k80 
PIC16F1512      PIC18F46J11 
PIC16F1513      PIC18F46J13 
PIC16F1516  YES PIC18F46J50 
PIC16F1517      PIC18F46J53 
PIC16F1518      PIC18F46K22 
PIC16F1519      PIC18F46k50 
PIC16F1528      PIC18F46k80 
PIC16F1529      PIC18F47J13 
PIC16F1574      PIC18F47J53 
PIC16F1575  YES PIC18F63J11 
PIC16F1578      PIC18F63J90 
PIC16F1579      PIC18F64J11 
PIC16F1613  YES PIC18F64J90 
PIC16F1614      PIC18F65J10 
PIC16F1615  YES PIC18F65J11 
PIC16F1618      PIC18F65J15 
PIC16F1619      PIC18F65J50 
PIC16F1703  YES PIC18F65J90 
PIC16F1704      PIC18F65J94 
PIC16F1705      PIC18F65K22 
PIC16F1707      PIC18F65k80 
PIC16F1708      PIC18F65K90 
PIC16F1709      PIC18F66J10 
PIC16F1713      PIC18F66J11 
PIC16F1716      PIC18F66J15 YES
PIC16F1717      PIC18F66J16 
PIC16F1718  YES PIC18F66J50 
PIC16F1719      PIC18F66J55 
PIC16F1764      PIC18F66J60 
PIC16F1765  YES PIC18F66J65 
PIC16F1768      PIC18F66J90 
PIC16F1769      PIC18F66J93 
PIC16F1782      PIC18F66J94 
PIC16F1783  YES PIC18F66J99 
PIC16F1784      PIC18F66K22 
PIC16F1786      PIC18F66k80 
PIC16F1787      PIC18F66K90 
PIC16F1788  YES PIC18F67J10 
PIC16F1789      PIC18F67J11 
PIC16F1824      PIC18F67J50 YES
PIC16F1825      PIC18F67J60 
PIC16F1826      PIC18F67J90 
PIC16F1827      PIC18F67J93 
PIC16F1828      PIC18F67J94 
PIC16F1829  YES PIC18F67K22 YES
PIC16F1847      PIC18F67K90 
PIC16F1933  YES PIC18F83J11 
PIC16F1934      PIC18F83J90 
PIC16F1936      PIC18F84J11 
PIC16F1937      PIC18F84J90 
PIC16F1938      PIC18F85J10 
PIC16F1939      PIC18F85J11 
PIC16F1946      PIC18F85J15 
PIC16F1947      PIC18F85J50 
PIC16LF1454     PIC18F85J90 
PIC16LF1455 YES PIC18F85J94 
PIC16LF1459     PIC18F85K22 
PIC16LF1503 YES PIC18F85K90 
PIC16LF1507     PIC18F86J10 
PIC16LF1508 YES PIC18F86J11 
PIC16LF1509     PIC18F86J15 
PIC16LF1512     PIC18F86J16 
PIC16LF1513     PIC18F86J50 
PIC16LF1516     PIC18F86J55 
PIC16LF1517     PIC18F86J60 
PIC16LF1518     PIC18F86J65 
PIC16LF1519     PIC18F86J72 
PIC16LF1528     PIC18F86J90 
PIC16LF1529     PIC18F86J93 
PIC16LF1574     PIC18F86J94 
PIC16LF1575     PIC18F86J99 
PIC16LF1578     PIC18F86K22 
PIC16LF1579     PIC18F86K90 
PIC16LF1613     PIC18F87J10 
PIC16LF1614     PIC18F87J11 
PIC16LF1615     PIC18F87J50 
PIC16LF1618     PIC18F87J60 
PIC16LF1619     PIC18F87J72 
PIC16LF1703     PIC18F87J90 
PIC16LF1704 YES PIC18F87J93 
PIC16LF1705     PIC18F87J94 
PIC16LF1707     PIC18F87K22 
PIC16LF1708     PIC18F87K90 
PIC16LF1709     PIC18F95J94 
PIC16LF1713 YES PIC18F96J60 
PIC16LF1716     PIC18F96J65 
PIC16LF1717     PIC18F96J94 
PIC16LF1718     PIC18F96J99 
PIC16LF1719     PIC18F97J60 
PIC16LF1764     PIC18F97J94 
PIC16LF1765     PIC18LF23K22    
PIC16LF1768     PIC18LF24J10    
PIC16LF1769     PIC18LF24J11    
PIC16LF1782     PIC18LF24J50    
PIC16LF1783     PIC18LF24K22    
PIC16LF1784     PIC18LF24K50    YES
PIC16LF1786     PIC18LF25J10    
PIC16LF1787     PIC18LF25J11    
PIC16LF1788     PIC18LF25J50    
PIC16LF1789     PIC18LF25K22    YES
PIC16LF1824     PIC18LF25K50    YES
PIC16LF1825     PIC18LF25k80    
PIC16LF1826     PIC18LF26J11    
PIC16LF1827     PIC18LF26J13    
PIC16LF1828     PIC18LF26J50    
PIC16LF1829 YES PIC18LF26J53    
PIC16LF1847     PIC18LF26K22    
PIC16LF1902     PIC18LF26K50    
PIC16LF1903 YES PIC18LF26k80    
PIC16LF1904     PIC18LF27J13    
PIC16LF1906     PIC18LF27J53    
PIC16LF1907     PIC18LF43K22    
PIC16LF1933...
Read more »

  • 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
  • 2 × 10KOhm resistor
  • 2 × 22pF capacitor
  • 4 × 1uF capacitor
  • 1 × pinheaders for ISP connectors, USB connector, PCB, steady hand for soldering

  • 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.

  • New devices support

    jaromir.sukuba08/16/2016 at 06:42 0 comments

    Amount of supported devices increased from 68 to 131. Some new PIC16F1xxx were added (16F151x, 16F178x, 16F19xx) and completely new PIC18 family was added - PIC18FxxJxx (like 18F26J50); which also required updated programmer firmware. Not all members of this family are here yet, that is subject of next release.

    Everything is on github and updated support table is at the project details section too.

  • New devices support update

    jaromir.sukuba08/05/2016 at 06:00 0 comments

    I increased number of supported devices from 48 to 68 (PIC16F1619 family and PIC16F1579 family added) and tested a few new ones.

    Sources at github, as usual.

  • PIC16F USB devices added

    jaromir.sukuba07/30/2016 at 20:34 0 comments

    I added support for PIC16F1454, 1455, 1459 and LF variants. I had PIC16F1455 at hand, so I tried to upload some small program and it worked as expected.

    Some minor mistakes fixed for PIC12F18xx.

    PIC12F1840, PIC16F1503, PIC16F1509 tested and working too.

    PIC programmer sketch verified to run on 2USD chinese arduino nano clone with CH340 USB-serial converter.

  • A lot of new devices supported

    jaromir.sukuba07/29/2016 at 12:54 0 comments

    Major device support update

    DEVICE	        TESTED
    PIC12F1501	
    PIC12F1571	
    PIC12F1572	YES
    PIC12F1822	
    PIC12F1840	
    PIC12LF1501	
    PIC12LF1571	
    PIC12LF1572	YES
    PIC12LF1822	
    PIC12LF1840	
    PIC16F1503	
    PIC16F1507	YES
    PIC16F1508	
    PIC16F1509	
    PIC16F1824	
    PIC16F1825	
    PIC16F1826	
    PIC16F1827	
    PIC16F1828	
    PIC16F1829	YES
    PIC16F1847	
    PIC16LF1503	
    PIC16LF1507	
    PIC16LF1508	
    PIC16LF1509	
    PIC16LF1824	
    PIC16LF1825	
    PIC16LF1826	
    PIC16LF1827	
    PIC16LF1828	
    PIC16LF1829	YES
    PIC16LF1847	
    PIC18F25K22	
    PIC18F25K50	YES
    PIC18F26K22	
    PIC18F45K22	
    PIC18F46K22	
    PIC18LF25K22	
    PIC18LF25K50	YES
    PIC18LF26K22	
    PIC18LF45K22	
    PIC18LF46K22	
    
    From something like dozen of devices we've got 42 devices supported, not all of them are verified though. Many of the devices are very very similar, or are derivative of some verified type, so I'm rather sure it should work.

View all 20 project logs

Enjoy this project?

Share      

Discussions

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