Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumOther questionsOther Wiring questions › Burning a blank AtMega128 w/ArduinoISP as burner

Page Index Toggle Pages: 1
Burning a blank AtMega128 w/ArduinoISP as burner (Read 26681 times)
10/26/10 at 15:03:03

Frank   Offline
YaBB Newbies
Argentina

Posts: 12
*
 
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) ? Shocked

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
 
IP Logged
 
Reply #1 - 10/27/10 at 03:24:38

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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
 
IP Logged
 
Reply #2 - 10/28/10 at 01:58:02

Frank   Offline
YaBB Newbies
Argentina

Posts: 12
*
 
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! Grin

Best Regards
Frank
 
IP Logged
 
Reply #3 - 10/28/10 at 05:46:43

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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.

 
IP Logged
 
Reply #4 - 10/28/10 at 15:08:19

Frank   Offline
YaBB Newbies
Argentina

Posts: 12
*
 
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
 
IP Logged
 
Reply #5 - 10/28/10 at 18:59:45

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hi Frank, here: http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1287426339
 
IP Logged
 
Reply #6 - 10/29/10 at 03:01:13

Frank   Offline
YaBB Newbies
Argentina

Posts: 12
*
 
Hi Ernando!
Sucefully Bootloader uploading with arduino as ISP!!!

Was only a problem w/Fuses!

Best Regards
Frank
 
IP Logged
 
Reply #7 - 10/29/10 at 07:08:23

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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.
 
IP Logged
 
Reply #8 - 10/29/10 at 15:57:43

Frank   Offline
YaBB Newbies
Argentina

Posts: 12
*
 
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
 
IP Logged
 
Reply #9 - 11/01/10 at 15:10:44

Frank   Offline
YaBB Newbies
Argentina

Posts: 12
*
 
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 Grin
 
IP Logged
 
Reply #10 - 11/01/10 at 17:25:39

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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.
 
IP Logged
 
Reply #11 - 11/02/10 at 20:04:10

Frank   Offline
YaBB Newbies
Argentina

Posts: 12
*
 
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? Shocked

Best Regards
Frank
 
IP Logged
 
Reply #12 - 11/02/10 at 23:46:45

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Which platform are you using?
 
IP Logged
 
Reply #13 - 11/03/10 at 14:28:00

Frank   Offline
YaBB Newbies
Argentina

Posts: 12
*
 
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 Grin

Best Regards
 
IP Logged
 
Page Index Toggle Pages: 1