Homemade Bus Pirate

Bus Pirate firmware and hardware development.

Re: Homemade Bus Pirate

Postby ricros » Wed Dec 28, 2011 10:03 am

where can I find just the bootloader 4.4?

Thanks
ricros
Newbie
Newbie
 
Posts: 25
Joined: Thu Apr 07, 2011 4:37 pm

Re: Homemade Bus Pirate

Postby Fezoj » Wed Dec 28, 2011 11:55 am

ricros wrote:I can erase, read the pic ID (0x4207)

I have checked PIC24FJXXGAXXX programming specification and it does not contain device with id 0x4207...
My BusPirate reports 0x0447 this means that it contains PIC24FJ64GA002 device. Did you write wrong device id by mistake?

Please check http://ww1.microchip.com/downloads/en/D ... 39768d.pdf page 64. In addition to that, different devices have different configuration word address. Hex file and device must match.
Fezoj
Newbie
Newbie
 
Posts: 16
Joined: Sun Nov 13, 2011 8:42 am

Re: Homemade Bus Pirate

Postby ricros » Wed Dec 28, 2011 1:36 pm

mystery solved, microchip sent me the wrong pic, this one is the XXXGBXXX and I just noticed that now, I'll have to order a new one

Thank you all for the help
ricros
Newbie
Newbie
 
Posts: 25
Joined: Thu Apr 07, 2011 4:37 pm

Re: Homemade Bus Pirate

Postby Fezoj » Wed Dec 28, 2011 2:11 pm

Since few people have found programmer useful, I decided to update it a bit. According to responses in this thread, UI was enhanced so that it feels more intuitive.

There are some known issues waiting for solution:
- does not export flash memory to a hex file
- does not check memory range yet. Assumption is that user loads correct hex file for PIC device.
- several ToDo(s) in source code

If you find a bug, please let me know or fix it :)
Snapshot:
Image
Fezoj
Newbie
Newbie
 
Posts: 16
Joined: Sun Nov 13, 2011 8:42 am

Re: Homemade Bus Pirate

Postby BrentBXR » Wed Dec 28, 2011 3:38 pm

did you ever make a compiled one? i cant find it compiled.
User avatar
BrentBXR
Hero Member
Hero Member
 
Posts: 567
Joined: Sat Nov 19, 2011 5:09 pm
Location: Cleveland, Ohio

Re: Homemade Bus Pirate

Postby Fezoj » Wed Dec 28, 2011 3:57 pm

BrentBXR wrote:did you ever make a compiled one? i cant find it compiled.


You can find it here: https://github.com/JoKr2/ApProg/tree/master/Release
Fezoj
Newbie
Newbie
 
Posts: 16
Joined: Sun Nov 13, 2011 8:42 am

Re: Homemade Bus Pirate

Postby BrentBXR » Wed Dec 28, 2011 6:32 pm

awesome! im gonna have to port this to a 168 or 813 i do not have any mega8's. I have not looked at the source yet but i bet it will fit on an attiny2313 or even just attiny 8pin (85, 25 or whatever) what do you think?

edit: I got it up and modified it a bit so its easier for me to read. at the moment its 3.7k; I bet we could get this down to the attiny2313 no problem.

edit2: actually I looked at the source and relised there was NO WAY theres 3k there; so I noticed I had some linkers and some librarys enabled. So I disabled all thouse and its only like 300b.

Man I have the perfect peice of hardware for this! Its a little USBASP AVR programmer. Just a simple board USB with an Atmega8 and some pins broken out on a shourded header... :D but I would need to get the vertiual com port USB on that atmega8.

edit3: I setup the pins adjustable in shared.h and added the 'standard' setbit clear bit defines and used those to set the clear the pins for readability. Im just doing this for myself; once I get those PICS so I can actually test it (editing it without testing it is just usless) Im doing it for myself so later I can easier port this to an attiny2313. But if anyone is interested in moving the MCLR, PGC, and PGD pins here it is. nothing special.
Attachments
avrpic_prog.zip
(2.62 KiB) Downloaded 481 times
Last edited by BrentBXR on Wed Dec 28, 2011 7:35 pm, edited 3 times in total.
User avatar
BrentBXR
Hero Member
Hero Member
 
Posts: 567
Joined: Sat Nov 19, 2011 5:09 pm
Location: Cleveland, Ohio

Re: Homemade Bus Pirate

Postby BrentBXR » Wed Dec 28, 2011 6:53 pm

Does any PIC experts know what PICS this will work with? I know the BP one; but what do you have to look for in the datasheet or whatever to determain if the PIC has the same programming ability? I really want to make myself one of these but I only have:

PIC16F648
&
PIC18LF2610
User avatar
BrentBXR
Hero Member
Hero Member
 
Posts: 567
Joined: Sat Nov 19, 2011 5:09 pm
Location: Cleveland, Ohio

Re: Homemade Bus Pirate

Postby Fezoj » Thu Dec 29, 2011 3:40 am

BrentBXR wrote:I setup the pins adjustable in shared.h and added the 'standard' setbit clear bit defines and used those to set the clear the pins for readability.


I like your changes. Can I upload them to git repository? Also, I was thinking that we could enhance a communication protocol a bit to enable user to assign Port and Pins directly in application in addition to communication parameters. What do you think?
Fezoj
Newbie
Newbie
 
Posts: 16
Joined: Sun Nov 13, 2011 8:42 am

Re: Homemade Bus Pirate

Postby ian » Thu Dec 29, 2011 4:21 am

Bootloader v4.4 is in the bus pirate download I think.

This programming algorithm is good for many 24f maybe 30 and 33. Memory setup for each is required and some may have quirks that need special instructions
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Homemade Bus Pirate

Postby BrentBXR » Thu Dec 29, 2011 11:52 am

Fezoj wrote:
BrentBXR wrote:I setup the pins adjustable in shared.h and added the 'standard' setbit clear bit defines and used those to set the clear the pins for readability.


I like your changes. Can I upload them to git repository? Also, I was thinking that we could enhance a communication protocol a bit to enable user to assign Port and Pins directly in application in addition to communication parameters. What do you think?


sure.

Its for sure doable, i don't know how useful that is though. Personally the only major thing I want when I get the PICs needed to try it, is to put it on an attiny2313. That wont be tough at all; hell we could put this on an attiny13 and use software UART (which I have already done).
User avatar
BrentBXR
Hero Member
Hero Member
 
Posts: 567
Joined: Sat Nov 19, 2011 5:09 pm
Location: Cleveland, Ohio

Re: Homemade Bus Pirate

Postby doctek » Wed Mar 07, 2012 1:34 am

Great project! An elegant and simple solution to getting started with a Bus Pirate built from scratch.

I'm attempting to program the bootloader for a Bus Pirate version 4. The programmer I built makes contact with the PIC24FJ256 on the BPv4, but reports that the chip did not respond properly. It still attempts to program the chip however.
Here are a couple of questions:
1. How long should it take to program the PIC? It's maybe 1/4 done after 1 hour. Seems awfully long?
2. Is the PIC24FJ256 being properly programmed even though it doesn't respond properly to the initial probe?
3. If the PIC24FJ256 is not supported currently, is there a plan to support it since it's on the BPv4?

Thanks - and thanks for this truly creative project.
doctek
Newbie
Newbie
 
Posts: 1
Joined: Wed Mar 07, 2012 1:21 am

MSP430 based PIC24 programmer

Postby pjkim » Thu Apr 12, 2012 5:21 pm

Some of you may have already seen this but I wanted to post this in case someone found themselves in the same situation I was in, i.e. needed to program the bootloader on the Bus Pirate but don't have a PIC or AVR programmer. I modified the Jozef's AVR firmware to run on a MSP430G2553 on the Launchpad. At $4.30 delivered, I think this is the cheapest programming solution. Here is a link
http://dangerousprototypes.com/2012/04/ ... he-msp430/

And thank you Jozef for the work you put into this and making it available to us.
pjkim
Newbie
Newbie
 
Posts: 46
Joined: Mon Apr 09, 2012 1:18 pm

Re: Homemade Bus Pirate

Postby pjkim » Thu Apr 12, 2012 6:11 pm

And another thing about how long the PIC programming takes. Do not try to burn the combined bootloader/firmware using the ICSP programmer! Burn the bootloader only-- it only takes a minute or two vs the ~45 minutes that the combined bootloader/firmware takes to program. Once the bootloader is burned, connect PGC and PGD to force the board into bootloader mode and then use the ds30 program to burn the firmware-- this should only take a minute or two. Total of 3-4 minutes for bootloader followed by ds30 vs 45 minutes for the combo.

Also for some reason, my Bus Pirate did not even work after the combo bootloader/firmware.
pjkim
Newbie
Newbie
 
Posts: 46
Joined: Mon Apr 09, 2012 1:18 pm

Re: Homemade Bus Pirate

Postby DigitalBrains » Sun Sep 23, 2012 10:03 am

I came across basically the same problem as the topic starter, but for a different PIC. I needed to program a PIC16F630. I tried the serial port style programmer that Jaakko Hyvätti's Picprog is written for, but I couldn't get it to work. So I made a simple AVR program and a quick-and-dirty patch to Picprog to flash me a PIC16F630. I'm releasing the program under the GPLv3. The included README does suppose you are well versed in working with AVR's, avr-libc and avr-gcc. As an afterthought, I've tried to make it a little easier by including a firmware for an ATmega88 @ 20 MHz.

<edit>
The firmware only uses one 8-bit timer and an external interrupt, all other functions are completely implemented in software. So it should be possible to run it on any AVR with enough memory and 6 I/O pins available.
</edit>

I suspect the programmer might work for all PIC12 and PIC16 chips supported by Picprog, but I didn't investigate much.

I used a simple USB to serial converter with 5V logic lines. Don't connect the AVR straight to a serial port of your PC :).

I'm providing this as-is. It did it's job for me, I added some documentation and functionality in the hope that it is useful for other people. I don't intend to do any more work on it, but others are encouraged to add all the bells and whistles they want! :)

I submitted the ugly, ugly patch for Picprog to the author of that program. Perhaps he or someone else wants to add proper support for this programmer to it. Or something alike.

This is my first post, and as such I can't create links to my program or Picprog. In 24 hours or so, I will come back and post this again with URL's.
<edit>Added URL's. But see next post for added content!</edit>
Last edited by DigitalBrains on Tue Sep 25, 2012 10:23 am, edited 1 time in total.
DigitalBrains
Newbie
Newbie
 
Posts: 2
Joined: Sun Sep 23, 2012 9:31 am

PreviousNext

Return to Bus Pirate Development

cron