Skip to main content
Topic: Homemade Bus Pirate (Read 41807 times) previous topic - next topic

Re: Homemade Bus Pirate

Reply #15
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?

Re: Homemade Bus Pirate

Reply #16
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.

Re: Homemade Bus Pirate

Reply #17
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.

Re: Homemade Bus Pirate

Reply #18
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 :)

Re: Homemade Bus Pirate

Reply #19
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.

Re: Homemade Bus Pirate

Reply #20
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.

Re: Homemade Bus Pirate

Reply #21
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

Re: Homemade Bus Pirate

Reply #22
[quote author="kehribar"]
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![/quote]
That would be fantastic. I'll add an extension point to simplify this work.

[quote author="ricros"] I tried to open it with visual studio express with no success[/quote]
What version of VS do you have? VS 2010 Express should work.

Re: Homemade Bus Pirate

Reply #23
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?

Re: Homemade Bus Pirate

Reply #24
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.

Re: Homemade Bus Pirate

Reply #25
[quote author="dmmedia"]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.[/quote]

I forgot that...

[quote author="dmmedia"]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.[/quote]

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!

Re: Homemade Bus Pirate

Reply #26
Hi Ricros

[quote author="ricros"]I got those "poll poll done", I can erase, read the pic ID (0x4207)...[/quote]

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.

Re: Homemade Bus Pirate

Reply #27
Quote
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.
Got a question? Please ask in the forum for the fastest answers.

Re: Homemade Bus Pirate

Reply #28
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...

Re: Homemade Bus Pirate

Reply #29
Yes, that is exactly what you want.
Got a question? Please ask in the forum for the fastest answers.