Wiring Forum
http://wiring.org.co/cgi-bin/yabb/YaBB.pl
Other questions >> Other Wiring questions >> Burning a blank AtMega128 w/ArduinoISP as burner
http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1288105383

Message started by Frank on 10/26/10 at 15:03:03

Title: Burning a blank AtMega128 w/ArduinoISP as burner
Post by Frank on 10/26/10 at 15:03:03
Hi all!
I'm building my own Wiring development board. Now i want to uploade into the AtMega128 the Wiring bootloader using the Arduino ISP as burner/programmer device.

I got a Arduino builded as a ISP programer, it let me load all the Arduinos bootloaders HEX files into any blank chip.

Now i want to burn my home-made wiring board using this ISP device.

So the code for the AVRdude is this?

avrdude -c stk500V1 -p m128 -P com1 -b 19200 -D -V -U flash:w:WiringBootV1.hex -u -q

Where goes the fuses...i forget that detail!!.

Some other way to do this? build a fake Arduino CPU profile to burn it the bootloader? (using programmer.txt) ? :o

Best Regards
Frank

Lo que estoy queriendo hacer es carga el bootloader en mi Atmega128 usando un arduino ISP como programador.

Es posible?

Muchas Gracias!
Frank

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by barragan on 10/27/10 at 03:24:38
hi Frank, not sure if that's possible, since the ISP sketch on arduino uses the stk500 v1 protocol while the Wiring board and software expects it to be stk500v2. Check this thread, the fuses etc are there http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1287426339

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by Frank on 10/28/10 at 01:58:02
Hi Ernando.
The upload operation looks nice, i upload the HEX file without any error, but some is realy wrong with my uP or PCB, because i cant see any signal or voltage at the 16Mhz cristal. My CPU is an 128L..yeap is not so correct but is what i can found.

Image about it:


The LED conected at the PG0 keep always ON. The serial buffers and power reg looks nice, GND and VCC are all conected so i think is something wrong with the fuses SETUP.

I must keep reading about AVRDUDE FUSES to found where go them! ;D

Best Regards
Frank

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by barragan on 10/28/10 at 05:46:43
hi Frank, as mentioned in the thread, you need an ISP programmer to program the fuses, try using the arduino as an ISP with atmel avrstudio (you can download it from the web), setup the fuses as in the thread and that's it. The reason your board is not working is because it needs the fuses programmed. You also need to flash the bootloader in the new chip which can also be done in the avrstudio. If you can wait some time I can try to get you the proper avrdude command during the weekend. But try the avrstudio it's not so bad to use.


Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by Frank on 10/28/10 at 15:08:19
Hi Ernando!. Yes i didnt try with Avr studio but the Flash tool is very easy so i will load the fuses and test again.

At the webdite where are them? i'm using this site http://www.avride.com/article/wiring/ like guide.

at that site:
Extended: 0xFF
High: 0xCC
Low: 0x3F

Unlock: 0x3F
Lock: 0x0F

Best Regards
Frank

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by barragan on 10/28/10 at 18:59:45
hi Frank, here: http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1287426339

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by Frank on 10/29/10 at 03:01:13
Hi Ernando!
Sucefully Bootloader uploading with arduino as ISP!!!

Was only a problem w/Fuses!

Best Regards
Frank

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by barragan on 10/29/10 at 07:08:23
great, would you like to make a tutorial for it? it would be nice for others : ), You can start on the Wiring wiki. Let me know if you need any help.

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by Frank on 10/29/10 at 15:57:43
Hi Ernando, yes i will copy al the CMDs i use and then i will post at wiki, may be some pictures too!!.

I use that link avride as guide to get all the fuses and the AVRdude because the AvrStudio fail.

Best Regards
Frank

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by Frank on 11/01/10 at 15:10:44
Hi Ernesto!
Please cheq this, is in Spanish but let me know if i was clear with the explanation..

http://wiki.wiring.org.co/index.php?title=About_Tutorials_and_Resources

Best Regards

Frank ;D

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by barragan on 11/01/10 at 17:25:39
hi Frank, cool, I moved the tutorial into a section called bootloaders with some minor edits, please check it: http://wiki.wiring.org.co/index.php?title=About_Tutorials_and_Resources
It seems confusing this part: "PIN2 y el PIN3 (USART0) como MISO y MOSI " please check it.

best,
Hernando.

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by Frank on 11/02/10 at 20:04:10
Hi Hernando.
For now all about wiring looks great, i upload a lot of code ported from some Arduino's project and runs great.

But i get some issue about the HardwareSerial Lib, i'm using a easy code that reads data from Serial1 and or it let data or in nothing a timeout triggers.

For some reason some data is loosed, where is the Hardware lib to analize it? :o

Best Regards
Frank

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by barragan on 11/02/10 at 23:46:45
Which platform are you using?

Title: Re: Burning a blank AtMega128 w/ArduinoISP as burner
Post by Frank on 11/03/10 at 14:28:00
The last Wiring, looks like the second serial port have a small buffer, thing that is strange because it has an UART so i'm reading that and not the serial directly but some chars are loosed. the FW version is 1.0, this days i go to upload the V2 bootloader on the mega.

May be is that ;D

Best Regards

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.