Author Topic: PIC Programming Protocol - Building a custom PIC programmer  (Read 4681 times)

0 Members and 1 Guest are viewing this topic.

Offline RendonTopic starter

  • Newbie
  • Posts: 9
PIC Programming Protocol - Building a custom PIC programmer
« on: November 25, 2015, 09:22:13 am »
I am wanting to build myself a custom-made PIC programmer, which will use a windows GUI that I will create myself. Presently, I use a PICkit 2 with its standalone GUI. It's good, but there are features I would like to add.

The only issue is, I don't know the programming protocol. I imagine the transaction of data takes place over an I^2C bus. I obviously have to feed it character by character, and then do checks, but I do not know the protocol. I do not know how to read data, like the config bytes or the device type.

I did a google search for this information but I found nothing useful. Is there anyone who could point me to this information? I  just need an overview; I can take care of the intricacies myself.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: PIC Programming Protocol - Building a custom PIC programmer
« Reply #2 on: November 25, 2015, 09:50:40 am »
Microchip have more variations of their programming protocol than you can shake a stick at.  Apart from a small handful of obsolete legacy OTP EPROM devices, they are all vaguely SPI like with a bidirectional data line and a clock line provided by the programmer, and instead of a /CS chip select, an active high VPP and in some cases a PGM signal.  Some PICs need 12.5V to enter programming mode, some less, and some just need a normal logic '1' on Vpp with a special code sequence clocked in on the data line.   There is no single document that gives all the programming specs. You have to trawl though the datasheets for indovidual devices to see which ones have the same programming spec.  If you want to support more than a few individual devices, its a PITA just gathering the data!

However the whole PICkit 2 system except for the MPLAB 8/X driver interface is open source - that's the firmware, the standalone Windows GUI, and the cross-platform command line utility, + the full schematic is published  so why re-invent the wheel?  You can add whatever you need to the software, (as long as that isn't support for 3rd party chips, which Microchip does take action against).
« Last Edit: November 25, 2015, 09:52:27 am by Ian.M »
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2549
  • Country: us
Re: PIC Programming Protocol - Building a custom PIC programmer
« Reply #3 on: November 25, 2015, 11:02:20 am »
Here are some direct Microchip PICKit2 source code links I found on their forum:

Here is the Microchip Downloads Archive (see bottom of the page for PICkit2).
« Last Edit: November 25, 2015, 11:38:08 am by MarkF »
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: PIC Programming Protocol - Building a custom PIC programmer
« Reply #4 on: November 25, 2015, 11:31:28 am »
And SuzyC on the forum here have some threads about pic programming https://www.eevblog.com/forum/microcontrollers/help!!!-why-can't-i-program-my-pic18f25k22-id's/
 

Offline RendonTopic starter

  • Newbie
  • Posts: 9
Re: PIC Programming Protocol - Building a custom PIC programmer
« Reply #5 on: November 25, 2015, 11:42:41 am »
Thanks guys. You've been very helpful. I may come across as ignorant - and perhaps I am. I actually did a google search for the PicKit 2 GUI source code some while back, couldn't find it, and gave up. Thanks so much for the link! I'm really glad to have it :-)
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: PIC Programming Protocol - Building a custom PIC programmer
« Reply #6 on: November 25, 2015, 05:35:36 pm »
What features do you want to add?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf