Re: Another Bus Pirate case and PIC programmer

Hacking multi-tool. Get one for $30, including worldwide shipping.

Another Bus Pirate case and PIC programmer

Postby W1N9Zr0 » Sat Feb 20, 2010 7:15 pm

Here is my take on a Bus Pirate case.
Image
It's made of a PS2 game case and integrates two breadboards, the bus pirate and an A23 12v battery for PIC programming.
More images

What do you think?
Last edited by W1N9Zr0 on Sun Feb 21, 2010 11:22 pm, edited 1 time in total.
W1N9Zr0
Newbie
Newbie
 
Posts: 5
Joined: Sat Feb 20, 2010 6:58 pm

Re: Another Bus Pirate case

Postby ian » Sun Feb 21, 2010 3:39 am

Fantastic build, I'll post it up. Thanks for sharing.

It's cool that you've got the 12volt battery so you'll be ready to program PICs right way.
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Another Bus Pirate case

Postby W1N9Zr0 » Sun Feb 21, 2010 10:46 am

I can program a couple PICs I have already! I wrote a quick C# app to use the raw 2 wire mode that does it, but it needs configuration for different chips because microchip decided to use slightly different programming cycles for almost every chip model.

I looked at usbpicprog, but it has half its programming logic in the firmware and half in xml files on the pc. The firmware is the one that deals with all the different programming cycles (it's all hard coded, 1,300 line, C case/if) which is the more difficult part, the xml files only define memory ranges.
Guess one could take the prog.c from the firmware code and write all the write_pic_blah() externals it uses to use the bus pirate and see if it compiles under normal C.

Right now though, I'm thinking of using my C# app though and making config files that define the whole programming cycle along with memory ranges. That way you don't need a compiler to add a chip definition, just search up the microchip PDF for it, type up a config file and you're set.
W1N9Zr0
Newbie
Newbie
 
Posts: 5
Joined: Sat Feb 20, 2010 6:58 pm

Re: Another Bus Pirate case

Postby ian » Sun Feb 21, 2010 11:02 am

Fantastic idea. Let me know how I can help, or if it would help to have a custom binmode or raw2wire extensions to improve speed or do 'tricks'.

If you're willing to put the code in SVN, I bet there are other people (like me) who would like to review or contribute to the code. I'd like to add support for the PCI24Fj64GA002, for obvious reasons.

I've worked on porting the USBPICPROG firmware, but there are some foibles because of the difference in data transfer on the two devices. Your method of just using the Bus Pirate as a flexable 2wire IO dongle is great. Are there some chips/operations that might have a problem without precise delays? We might be able to write some extensions for that stuff.

Also, would you like a PIC programming adapter with a boost converter, or maybe just to see the circuit I used for switching VPP and MCLR?
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Another Bus Pirate case

Postby Sjaak » Sun Feb 21, 2010 2:10 pm

I though all the pic12, 16 and 18 had the same way of programming. Since they use a synchronious communication timing isn't very critical or am I way off? I think I really need to look deeper into this :D But good to hear it is possible with the standard libraries ;)

BTW nice the fiberoptics!
For my projects and failures see my blog: http://SMDprutser.nl/
User avatar
Sjaak
Fellow
Fellow
 
Posts: 3291
Joined: Sun Jan 03, 2010 2:45 pm
Location: Hiero

Re: Another Bus Pirate case

Postby W1N9Zr0 » Sun Feb 21, 2010 11:22 pm

ian wrote:Are there some chips/operations that might have a problem without precise delays? We might be able to write some extensions for that stuff.

Sjaak wrote:I though all the pic12, 16 and 18 had the same way of programming. Since they use a synchronious communication timing isn't very critical or am I way off?

Yup, the 10-16s I looked at use synchronious communication, and 18 and up probably too but I haven't looked at the higher end chips too much yet.

ian wrote:Also, would you like a PIC programming adapter with a boost converter, or maybe just to see the circuit I used for switching VPP and MCLR?

Sure, that'd be great!

I can put it under SVN once I figure out the format for the config files and clean up my bus pirate raw mode wrapper.
The main problem is that there are so many different programming sequences. I've seen at least 5 different ones in the microchip programming spec pdfs for the 8 bit chips. There are at least 3 "begin programming" commands, at least 3 combinations of begin-write-(optional)end cycles, and sometimes different chips do different things with the same command!
I'm wondering if it's easier to work with the pdfs or with the usbpicprog firmware source to figure out what config options the files need to have.

Also, if anyone uses Mono, does Mono implement System.IO.Ports.SerialPort?
W1N9Zr0
Newbie
Newbie
 
Posts: 5
Joined: Sat Feb 20, 2010 6:58 pm

Re: Another Bus Pirate case and PIC programmer

Postby ian » Tue Feb 23, 2010 4:21 am

The ds30 Loader GUI is serial port and works on Mono, you might be able to find some code examples there for universal serial port calls. I was going to give you a link, but I realized we're just using Mackey's current version now.

I gave you access to the google SVN. You'll need to check your google code profile to get your google code password. Feel free to put your work where you like, we can always move it later.

The usbpicprog source seems to reflect a lot of real-world experience. I'd tap that as much as possible to avoid reworking the same issues Frans encountered.

I just read through the 24fjxxxga0xx programming spec for fun. Looks like nothing too critical timing wise:
http://ww1.microchip.com/downloads/en/D ... 39768d.pdf

The 24fj and 33F don't need a high VPP, I'm unsure about the 30F and 24hj.

I'm posting the case up now, thanks for the picture.
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Another Bus Pirate case and PIC programmer

Postby Nibble » Sat Feb 27, 2010 8:59 pm

Hello all,

I am wondering...

What about using the idea (and source code) from the Universal OS PIC Programmer: "This programmer requires only a basic terminal program capable of uploading an ascii PIC HEX file. It does not matter what operating system or computer (MAC, Win98, XP, Vista, DOS, Linux, etc.) is used to talk to it."

The source code is available and perhaps can be easly adapted as a BusPirate script...

Please see: http://mondo-technology.com/upp.html
Nibble
Newbie
Newbie
 
Posts: 6
Joined: Sat Feb 27, 2010 8:53 pm

Re: Another Bus Pirate case and PIC programmer

Postby Sjaak » Sun Feb 28, 2010 3:30 am

Looks great. It looks like it can be converted to a new protocol. I really like the idea.

Too bad it is written in asm :) Perhaps it is easier to read the datasheet and implement from scratch. However my asm skill are getting rusty ;)
For my projects and failures see my blog: http://SMDprutser.nl/
User avatar
Sjaak
Fellow
Fellow
 
Posts: 3291
Joined: Sun Jan 03, 2010 2:45 pm
Location: Hiero

Re: Another Bus Pirate case and PIC programmer

Postby honken » Sun Feb 28, 2010 1:10 pm

I got inspired by this, and made a case of my own.
I used a mints tin can, very similar i size to the ubiquitous Altoids variant.
I've got a v2go and it's fastened with some adhesive tack, so it's removable.
I could also fit one of those mini breadboard from Seeedstudio/SparkFun (can't rememder where I got it from) as well as some jumper cables.

ImageImage
Attachments
BusPirateCase-external.JPG
BusPirateCase-internal.JPG
User avatar
honken
Full Member
Full Member
 
Posts: 190
Joined: Fri Feb 26, 2010 10:34 am
Location: Stockholm/Sweden

Re: Another Bus Pirate case and PIC programmer

Postby ian » Sun Feb 28, 2010 1:14 pm

I like the guide in the lid. I'll post these up. Fantastic, really great job.
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Another Bus Pirate case and PIC programmer

Postby AZRobbo » Sun Feb 28, 2010 9:08 pm

I LOVE the guide in the lid - can you share the file with us?
AZRobbo
Newbie
Newbie
 
Posts: 2
Joined: Sun Feb 28, 2010 8:53 pm

Re: Another Bus Pirate case and PIC programmer

Postby honken » Mon Mar 01, 2010 12:46 pm

Sure, in part.
I made a little logo for myself and therein lies perhaps a problem.
The skull and bones are taken from wikipedia and GPL'd - so no problem,
but the USB-trident is a registered trademark (again according to wikipedia, where I stole it from).
I'm not sure if this use constitutes any violations.
So I think Ian should decide wether he wants possible infringements on his site.

The rest is stolen from Ian's blog, with some small modifications (removed version 2+ texts).

But here's a safe version without the logo.
Attachments
bp-sheetsheet-safe.svg.zip
(323.98 KiB) Downloaded 360 times
User avatar
honken
Full Member
Full Member
 
Posts: 190
Joined: Fri Feb 26, 2010 10:34 am
Location: Stockholm/Sweden

Re: Another Bus Pirate case and PIC programmer

Postby ian » Mon Mar 01, 2010 1:03 pm

Without the logo if fine for me. Could you give us a link to the GPL'd image license page, just for good measure.
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Another Bus Pirate case and PIC programmer

Postby honken » Mon Mar 01, 2010 1:38 pm

User avatar
honken
Full Member
Full Member
 
Posts: 190
Joined: Fri Feb 26, 2010 10:34 am
Location: Stockholm/Sweden

Next

Return to Bus Pirate Support