Techmeology
Posts: 30
Joined: Wed Mar 28, 2012 8:52 pm

Yet Another PIC Programmer for the Raspberry Pi

Sun Oct 07, 2012 9:46 pm

Hello, all!

I've been working on (yet another) PIC Programmer for the Raspberry Pi: http://www.techmeology.co.uk/rpipic/. This particular one features:
  • The ability to program 12 bit and 14 bit PICs
  • Autodetection of 14 bit PICs
  • A modular architecture that could be extended to support other chips
  • Diagnostic LEDs and a simple test circuit (with two more LEDs)
Comments/bug reports are welcome ;)

Enjoy,

Techmeology
Check out cool stuff I'm doing, e.g my PIC Programmer for the Raspberry Pi: http://www.techmeology.co.uk/rpipic/

User avatar
meltwater
Posts: 1015
Joined: Tue Oct 18, 2011 11:38 am

Re: Yet Another PIC Programmer for the Raspberry Pi

Wed Jan 09, 2013 4:13 pm

Looks like a great project.
Would be interesting to have a go with it and perhaps feature an article on it in the MagPi.

Would a standard serial programmer work with the Raspberry Pi too (via a USB-RS232 adaptor)?
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam

Techmeology
Posts: 30
Joined: Wed Mar 28, 2012 8:52 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Mon Feb 25, 2013 4:55 pm

If you want to do a magpi article, sure! Let me know if I can help with that. The board itself isn't designed to use RS232, but I designed the software to be reasonably modular - you might well be able to use an RS232 adapter.

Techmeology

p.s: Damn, I didn't notice a notification email about your reply - sorry for the delay:p
Check out cool stuff I'm doing, e.g my PIC Programmer for the Raspberry Pi: http://www.techmeology.co.uk/rpipic/

avstomusic
Posts: 1
Joined: Sat Apr 20, 2013 4:24 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat Apr 20, 2013 4:44 pm

Screen Shot 2013-04-20 at 9.20.13 AM.jpg
Screen Shot 2013-04-20 at 9.20.13 AM.jpg (47.04 KiB) Viewed 10696 times
Thank you, this seems like a a great circuit. Although I'm a little confused as how this connects to the Raspberry PI. I'm new to the pic controllers programming but it doesn't take a degree in electronics to notice that the numbers of the GPIO headers don't quite match. For example in the little table chart says VPP control should be pin 9, which according to the Raspberry PI documentation has no connection, while according to the schematic GPIO numbers, VDD control for example is on pin 4 which again has no connection on the Raspberry GPIO. What are all those numbers referring to? See attached screenshot.

cae2100
Posts: 143
Joined: Tue Jan 08, 2013 10:35 am

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat Apr 20, 2013 10:33 pm

I thought about doing a design like this, but instead, using a design like the old K150 programmers. Due to the lack of working software in linux, I kinda abandoned the idea. Its something to think about bc it has dc/dc converter for 12v and everything built in, no need for external stuff, but the software is the real issue.

Neat idea for your programmer btw, a little observation is that your using a seperate 5v regulator, why not just use pin 2/5v out on the rpi? The pic chip uses a few uA and maybe a few mA at most, so it wouldnt even be any drain tbh. No use reinventing the wheel and it'd cut down on cost to make it/parts. :P

The 12v, you can maybe use a seperate chip to run as a pwm generator to use a buck/boost converter to convert the DC up to 12/13v needed, then you wouldnt need any external regulators or anything like that. Just make it into a self contained shield for the rpi and it'd be good to go for your projects. I believe roman black has a buck/boost converter that just uses like 2 transistors and some other components to raise the 5v to 13v for the chips.
http://www.romanblack.com/smps/conv.htm
There's the converter I was talking about.

Edit: Just a question, why use 6v dc when most chips can only handle 5v?
If it isnt smoking and blown into pieces, it's not pushed far enough yet. :P
http://cae2100.wordpress.com

Techmeology
Posts: 30
Joined: Wed Mar 28, 2012 8:52 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat Jul 13, 2013 1:41 am

Hi

avstomusic: The VDD control pin is used to control whether power is received by the PIC. The circuit itself is not powered by the Pi.
cae2100: Thanks for the suggestions. If I were to make many of these, I might well try to power it from the Pi alone. Some of the design of the programmer arises from the fact that I constructed it from parts I had (or thought I should have). There's a certain CompSci urge to solve a generalised problem in a systematic way:p

Thanks

p.s: Hopefully I'll get notified next reply:p
Check out cool stuff I'm doing, e.g my PIC Programmer for the Raspberry Pi: http://www.techmeology.co.uk/rpipic/

mano1
Posts: 1
Joined: Tue Oct 01, 2013 6:34 am

Re: Yet Another PIC Programmer for the Raspberry Pi

Thu May 22, 2014 4:04 am

Can I program a PIC12F629 with this setup? I am interested to do this (instead of buying a programmer already built), but haven't programmed a PIC before :)

danjperron
Posts: 4504
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Yet Another PIC Programmer for the Raspberry Pi

Fri May 23, 2014 12:17 am

Hi Techmeology,


6 month ago ,

I post a universal pic programmer in python.

I don't have so many leds and I was using the Raspberry Pi to program the I.C. Way simpler

I thing Walter Fukuoka has a nice package about it.

Please have a look before and after this post.

http://www.raspberrypi.org/forums/viewt ... 69#p429669

Daniel

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia

Re: Yet Another PIC Programmer for the Raspberry Pi

Fri May 23, 2014 12:44 am

Hi,
mano1 wrote:I am interested to do this (instead of buying a programmer already built), but haven't programmed a PIC before :)
You might think about a circuit/chip with pre-programmed bootloader. It should be the proper start, when you're becoming familiar with this area (one typical trap are fuses, which you can avoid by using this "prefabricated" approach). Later on, you'll quickly find out that in-circuit debugger is worth every cent spent for it... ;-)


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

hampi
Posts: 223
Joined: Fri May 31, 2013 11:29 am

Re: Yet Another PIC Programmer for the Raspberry Pi

Fri May 23, 2014 2:58 pm

One more PIC programmer

http://holdenc.altervista.org/rpp/

http://mujweb.cz/tlc/rpp/

and my PCB for it

https://github.com/oh7bf/PiPIC/tree/master/RaspiPICprog

The programmer code is plain C if you like the unix command line interface.

rtek1000
Posts: 27
Joined: Wed Mar 12, 2014 9:21 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Wed Aug 20, 2014 6:11 pm

hello,

I would like to make a programmer for eeprom w25q128.

I found a library for Arduino to this memory (SPI):
https://code.google.com/p/winbondflash/

have some way to use this interface to program eeprom using the RPI?

picpgm
Posts: 1
Joined: Tue Jan 27, 2015 9:45 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Tue Jan 27, 2015 9:49 pm

Hello together,

if you are looking for a PIC programmer for the Raspberry Pi, have a look at PICPgm:
http://picpgm.picprojects.net

The Linux version which is supporting more than 650 different PIC microcontrollers has been ported to the Raspberry Pi. It uses the GPIO pins to program the PIC.

Regards!

indula
Posts: 1
Joined: Mon Jul 13, 2015 11:27 am

Re: Yet Another PIC Programmer for the Raspberry Pi

Tue Apr 26, 2016 7:19 am

Hi, I have a PIC which has a 26 pin raspberry connector, can you help me in the process of connecting the raspberry pi with my PIC board? And can I get data from the PIC to the raspberry pi and save it in a database in the Pi.?? Please help me with the steps? Do i have to follow the steps in your blog or what?

NiaDebesis
Posts: 4
Joined: Sat May 12, 2018 9:35 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat May 12, 2018 9:38 pm

Techmeology

Hello at all
Ill try to revive this old topica
I want to know if I can program a pic16877a with this circuit (that I have already built)

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sun May 13, 2018 5:55 pm

The following are the devices I have programmed with my Raspberry Pi PIC Programmer, details can be found here:
http://www.newsdownload.co.uk/pages/RPiPIC.html

Code: Select all

#/* Currently supported devices:                                             */
#/*                                                                          */
#/* 12F629          12F675          12F683                                   */
#/*                                                                          */
#/* 16F88           16F627          16F628A         16F630          16F684   */
#/* 16F690          16F876A         16F877A         16F886          16F887   */
#/* 16F18313        16F18323        16F18324        16F18344        16F18325 */
#/* 16F18345        16F18326        16F18346                                 */
#/*                                                                          */
#/* 18F2420         18F2455         18F2520         18F2550         18F4420  */
#/* 18F4455 18F4520 18F4550 */
http://www.newsdownload.co.uk/

NiaDebesis
Posts: 4
Joined: Sat May 12, 2018 9:35 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat May 19, 2018 8:50 am

Why all the other circuits use pnp and npn transistors and the circuit that is been posted here use only npn transistors

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat May 19, 2018 9:44 am

Sourcing or sinking current, sink current to ground with NPN source current from +V with PNP.
http://www.newsdownload.co.uk/

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 15100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat May 19, 2018 11:27 am

avstomusic wrote:
Sat Apr 20, 2013 4:44 pm
For example in the little table chart says VPP control should be pin 9, which according to the Raspberry PI documentation has no connection, while according to the schematic GPIO numbers, VDD control for example is on pin 4 which again has no connection on the Raspberry GPIO. What are all those numbers referring to? See attached screenshot.
the DNC descriptions in this table are nonsense, do you really believe there are GPIO pins that should not be used (except pins 27 and 28, which are I2C pins exclusively assigned for HAT boards).

this is a real GPIO overview:
Image

as you can see pin 9 is simply a GND (ground) pin, and pin 4 carries 5V.

I do agree the GPIO assignment is a bit weird, or not explained well. does "1" means GPIO1 or pin 1 (pin 1 is 3V3). pin 6 is GND however...

I think the GPIO's numbered 1 to 6 in the schematic are wrong, or simply describing a pinheader, but the table above it is correct
with:

Code: Select all

1 = VDD Control	GPIO pin 11
2 = VPP Control	GPIO pin 9
3 = Clock Control	GPIO pin 8
4 = Data Out Control	GPIO pin 25
5 = Data In	GPIO pin 24
6 = GND         (any GND pin)
but that is my own guess....

NiaDebesis
Posts: 4
Joined: Sat May 12, 2018 9:35 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat May 19, 2018 3:43 pm

BirchJD wrote:
Sat May 19, 2018 9:44 am
Sourcing or sinking current, sink current to ground with NPN source current from +V with PNP.
Oh thanks

So for what is the button in your circuit? Is some sort of reset button?
And if I have buolt already the pcb for the circuit above can I use your software or not?

NiaDebesis
Posts: 4
Joined: Sat May 12, 2018 9:35 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sat May 19, 2018 3:55 pm

mahjongg wrote:
Sat May 19, 2018 11:27 am
avstomusic wrote:
Sat Apr 20, 2013 4:44 pm
For example in the little table chart says VPP control should be pin 9, which according to the Raspberry PI documentation has no connection, while according to the schematic GPIO numbers, VDD control for example is on pin 4 which again has no connection on the Raspberry GPIO. What are all those numbers referring to? See attached screenshot.
the DNC descriptions in this table are nonsense, do you really believe there are GPIO pins that should not be used (except pins 27 and 28, which are I2C pins exclusively assigned for HAT boards).

this is a real GPIO overview:
Image

as you can see pin 9 is simply a GND (ground) pin, and pin 4 carries 5V.

I do agree the GPIO assignment is a bit weird, or not explained well. does "1" means GPIO1 or pin 1 (pin 1 is 3V3). pin 6 is GND however...

I think the GPIO's numbered 1 to 6 in the schematic are wrong, or simply describing a pinheader, but the table above it is correct
with:

Code: Select all

1 = VDD Control	GPIO pin 11
2 = VPP Control	GPIO pin 9
3 = Clock Control	GPIO pin 8
4 = Data Out Control	GPIO pin 25
5 = Data In	GPIO pin 24
6 = GND         (any GND pin)
but that is my own guess....
I think that the numbers from 1 to 6 in the schematic are only to make some sort of order
And the numbers in the chart above indicates the GPIO's
Because if can I use a Pi or a PI 3 is easy to use the GPIO's numbers to indicate correct pins

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 15100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Yet Another PIC Programmer for the Raspberry Pi

Sun May 20, 2018 7:40 pm

NiaDebesis wrote:
Sat May 19, 2018 3:55 pm
I think that the numbers from 1 to 6 in the schematic are only to make some sort of order
And the numbers in the chart above indicates the GPIO's
Because if can I use a Pi or a PI 3 is easy to use the GPIO's numbers to indicate correct pins
yes, that was my thought also, the numbering probably stems from a 6-pin pinheader which connect to the PI with six wires.
if the chart is in the same order as the wires, it should work with the supplied software.

User avatar
BirchJD
Posts: 162
Joined: Tue Nov 13, 2012 7:43 pm

Re: Yet Another PIC Programmer for the Raspberry Pi

Sun May 20, 2018 9:27 pm

NiaDebesis wrote:
Sat May 19, 2018 3:43 pm
BirchJD wrote:
Sat May 19, 2018 9:44 am
Sourcing or sinking current, sink current to ground with NPN source current from +V with PNP.
Oh thanks

So for what is the button in your circuit? Is some sort of reset button?
And if I have buolt already the pcb for the circuit above can I use your software or not?
The button and one of the LEDs is for the test code supplied in the following directory:
https://github.com/BirchJD/RPiPIC/tree/master/TEST_ASM

Each time I do a release of the source code, I go though each of the PIC devices and program the test code. The test code will flash the LED when the switch is pressed. It's a way of making sure he programming process is working. Both for when I do a release and for if a program doesn't seem to be working, the programmer can be ruled out if the test code can be programmed onto the device and it works.

It may be possible to get the programmer this post is about working with my Python programming script, but some of the signals may be inverted because of the way the circuit is made. So you might need to adjust the code in places.

Jason
http://www.newsdownload.co.uk/

Return to “Other projects”