Homemade Bus Pirate

Bus Pirate firmware and hardware development.

Re: Homemade Bus Pirate

Postby dmmedia » Sat Dec 17, 2011 5:24 pm

Thank you very much for sharing, Jozef!

Just to be sure:
1. Atmega8 VCC = +5V? Wouldn't it be wise to use voltage level convertor to 3.3V then? (According to specs, PIC24 tolerates 5V on digital pins, but requires 3.3V on MCLR pin)
2. Button connected to GND?
3. green wire from pin 1 (RST) just forgotten and doesn't play?
4. XTAL is 16.0 and connected with capacitors of 18pF each?
5. Value of pin15 (PORTB1) to ICSP PGD resistor is 15K?
6. And there is no more hidden connections from ICSP pins?
dmmedia
Newbie
Newbie
 
Posts: 11
Joined: Fri Dec 09, 2011 5:19 pm

Re: Homemade Bus Pirate

Postby Fezoj » Sun Dec 18, 2011 3:42 am

Hello,
I updated my post with circuit schematic. Please check.

Here are some answers:
1. ATMEGA operates from 2,7V to 5,5V so everything is powered from 3,3V supply.
2. Yes, it is a standard reset button - reset circuit is optional. Second pin of button is connected to Vcc via 10K resistor.
3. you are correct, this wire does not play any role here. I did not notice it somehow.
4. correct. Capacitors are 22pF but 18pF would be ok as well I guess.
5. Actually it is 1k. I use it because PGD pin changes to output state from time to time. Direct connection may lead to short circuit.
Fezoj
Newbie
Newbie
 
Posts: 16
Joined: Sun Nov 13, 2011 8:42 am

Re: Homemade Bus Pirate

Postby dmmedia » Sun Dec 18, 2011 4:23 am

Thanks for update, Jozef

Circuit was very clear with your description. I have drawn it exactly as in your update. Only few values were uncertain.

That's interesting how Atmega8 works from 3.3V at 16MHz.
According to specs it shouldn't :) That's why there were my questions, but if it possible to push limits that much, then it may be useful.

Quote from specs:

• Operating Voltages
– 2.7V - 5.5V (ATmega8L)
– 4.5V - 5.5V (ATmega8)
• Speed Grades
– 0 - 8MHz (ATmega8L)
– 0 - 16MHz (ATmega8)

Unfortunately, it happened that I have no Atmega8 chips and my Atmega16 wouldn't work stable at 3.3V. So I will try to update the code and schematics for Arduino and will share it also if it work.
dmmedia
Newbie
Newbie
 
Posts: 11
Joined: Fri Dec 09, 2011 5:19 pm

Re: Homemade Bus Pirate

Postby Fezoj » Sun Dec 18, 2011 12:02 pm

Hello,
it is good to hear that code may be useful for someone else.

ATmega8A should work stable at 16MHz/3,3V.
Nevertheless 16MHz is not mandatory. I used it because it was the first crystal I found... Feel free to use any other frequency just do not forget to match baudrate tolerance. When you go for lower frequency than 10MHz, you can safely remove all nop() instructions from code.

I am going to create a connection configuration dialog as I realized that other people may naturally use it :)
Fezoj
Newbie
Newbie
 
Posts: 16
Joined: Sun Nov 13, 2011 8:42 am

Re: Homemade Bus Pirate

Postby dmmedia » Mon Dec 19, 2011 5:02 pm

Sadly could not get it work with Arduino.

But, I have managed to make my Atmega16 work stable at 3,3V and at 1MHz internal oscillator and 4800 baud rate.
Changed the settings in AVR Studio, compiled programmer firmware and it worked.
A bit fiddling with your C# GUI program (at first did not noticed, that it programs block by block and interrupted it after 1st block programmed :D ), and now I have working Bus Pirate!
However selftest showed, that I have soldered ADC1 and ADC2 pins together. Will fix that soon and post a photo to get the next free PCB :)

Thanks a lot Jozef for your help.
dmmedia
Newbie
Newbie
 
Posts: 11
Joined: Fri Dec 09, 2011 5:19 pm

Re: Homemade Bus Pirate

Postby kehribar » Fri Dec 23, 2011 5:11 am

This is great!

I'm quite busy right now for writing a Processing library for Little-Wire but as soon as possible, i'll try to port this to Little-Wire! You clearly wrote the functions seperate, and i will try to use v-usb as an interface rather than UART. I'll keep updated if there will be any developement!

Thanks for the project!

ihsan.
Last edited by kehribar on Sun Dec 25, 2011 4:22 pm, edited 1 time in total.
User avatar
kehribar
Jr. Member
Jr. Member
 
Posts: 68
Joined: Thu Dec 08, 2011 9:39 am

Re: Homemade Bus Pirate

Postby ricros » Fri Dec 23, 2011 10:44 am

Hi

Where did you program the software? I tried to open it with visual studio express with no success

Thanks for the project, it was just what I was looking for
ricros
Newbie
Newbie
 
Posts: 25
Joined: Thu Apr 07, 2011 4:37 pm

Re: Homemade Bus Pirate

Postby Fezoj » Fri Dec 23, 2011 4:15 pm

kehribar wrote:I'm quite busy right now for writing a Processing library for Little-Wire but as soon as possible, i'll try to port this to Little-Wire!

That would be fantastic. I'll add an extension point to simplify this work.

ricros wrote: I tried to open it with visual studio express with no success

What version of VS do you have? VS 2010 Express should work.
Fezoj
Newbie
Newbie
 
Posts: 16
Joined: Sun Nov 13, 2011 8:42 am

Re: Homemade Bus Pirate

Postby ricros » Fri Dec 23, 2011 7:55 pm

I have vs 2010 express too, if I double click on the .csproj file it gives me an error, if i open it inside VS it works, don't know why but that part is working now...

does the program show any message when it finishes to write the .hex?
ricros
Newbie
Newbie
 
Posts: 25
Joined: Thu Apr 07, 2011 4:37 pm

Re: Homemade Bus Pirate

Postby dmmedia » Mon Dec 26, 2011 10:52 am

I am not Jozef, but I think I can help.

VS 2010 Express gave me an error also. I have directed to MS website, registered C# part of VS for free, got the serial, entered it and voila - no more errors. Perhaps you have the same error.

For the second question, I cannot remember the exact successful string, but the program should issue a couple of "poll..." strings after each block written and then should stop at the new empty line. Then you will know, that the processing stopped. If you have lots of repeating "poll..." strings, then something is wrong in your wiring between AVR and PIC.
dmmedia
Newbie
Newbie
 
Posts: 11
Joined: Fri Dec 09, 2011 5:19 pm

Re: Homemade Bus Pirate

Postby ricros » Mon Dec 26, 2011 2:30 pm

dmmedia wrote:VS 2010 Express gave me an error also. I have directed to MS website, registered C# part of VS for free, got the serial, entered it and voila - no more errors. Perhaps you have the same error.


I forgot that...

dmmedia wrote:For the second question, I cannot remember the exact successful string, but the program should issue a couple of "poll..." strings after each block written and then should stop at the new empty line. Then you will know, that the processing stopped. If you have lots of repeating "poll..." strings, then something is wrong in your wiring between AVR and PIC.


I got those "poll poll done", I can erase, read the pic ID (0x4207)...

I've double checked the connections, they're all good, I think the program finishes to write the firmware...

I've tried several terminals, with the right configs but I got no answer from the BP...

Does anyone have a blink example to see if the pic is dead?

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

Re: Homemade Bus Pirate

Postby Fezoj » Tue Dec 27, 2011 6:47 am

Hi Ricros

ricros wrote:I got those "poll poll done", I can erase, read the pic ID (0x4207)...


If you can read DeviceId and those "Writing 64 instructions at XY poll poll done." strings everything works as expected. So it looks like you are burning wrong hex file into device. The hex file shall contain configuration words at the end. For example, if you are trying to burn in BusPirate, you have to burn in bootloader hex instead of firmware hex because only bootloader hex file contains configuration words at the end. After that you can load firmware via bootloader.
Fezoj
Newbie
Newbie
 
Posts: 16
Joined: Sun Nov 13, 2011 8:42 am

Re: Homemade Bus Pirate

Postby ian » Tue Dec 27, 2011 7:49 am

if you are trying to burn in BusPirate, you have to burn in bootloader hex instead of firmware hex because only bootloader hex file contains configuration words at the end. After that you can load firmware via bootloader.


Word.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Homemade Bus Pirate

Postby ricros » Tue Dec 27, 2011 10:41 am

I'm trying to burn the production firmware package:

http://code.google.com/p/the-bus-pirate ... ufacturing

as far as I know this package includes the bootloader and firmware...
ricros
Newbie
Newbie
 
Posts: 25
Joined: Thu Apr 07, 2011 4:37 pm

Re: Homemade Bus Pirate

Postby ian » Wed Dec 28, 2011 3:28 am

Yes, that is exactly what you want.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

PreviousNext

Return to Bus Pirate Development