Pages: [1]   Go Down
Author Topic: Problem with burning usbasp-bootloader to ATMEGA8 with Arduino  (Read 4626 times)
0 Members and 1 Guest are viewing this topic.
DE
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys,

I want to build a "Metaboard" with an ATMEGA8 (Metaboard Info: https://metalab.at/wiki/Metaboard ).
Just tried to burn the usbasp-bootloader (http://www.obdev.at/products/vusb/usbasploader.html) with an Arduino UNO as ISP, but got some errors:
Code:
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: failed to write flash memory, rc=-4
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I used this manual, Atmega on breadboard with an ext. oscillator (16MHz): http://arduino.cc/en/Tutorial/ArduinoISP
...and recognized that UNO seems to be incompatible, but I've read from some people who had success burning bootloaders with UNOs.

In my "boards.txt", I added the following lines:

Code:
##############################################################
metaboard.name=Metaboard w/ ATMega8
metaboard.upload.protocol=usbasp
metaboard.upload.maximum_size=7168
metaboard.upload.speed=19200
 
metaboard.build.mcu=atmega8
metaboard.build.f_cpu=16000000L
metaboard.build.core=arduino
 
metaboard.bootloader.low_fuses=0xef
metaboard.bootloader.high_fuses=0xc9
metaboard.bootloader.path=metaboard
metaboard.bootloader.file=mega8_16mhz.hex
metaboard.bootloader.unlock_bits=0x3F
metaboard.bootloader.lock_bits=0x2F
 
metaboard.upload.disable_flushing=true

What went wrong here - can somebody help me?
I don't have an external programmer, so the Arduino must do it! smiley-wink

Greetings, Julian

PS: The RX/TX-LEDs flashed some times and after ~10s, I got the errors above.
« Last Edit: February 20, 2012, 12:49:54 pm by HeyYeah » Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

metaboard.upload.protocol=usbasp

change to

metaboard.upload.protocol=avrisp

if your using arduino as a uploader, also if your using 1.0 version of the IDE get the 022 version and use its arduinoisp sketch, there is something screwed up with 1.0 (why I dont know it worked perfectly before)
Logged


DE
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
Done burning bootloader.

Thank you very much, it works fine!  smiley

For others, having the same or a similar problem:
I changed "usbasp" to "avrisp" in boards.txt and uploaded the bootloader with IDE version 0022 with the Arduino-ISP-sketch of 0022.
Logged

DE
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got another problem:
I connected the Metaboard to my PC and after pressing the reset-button, I was able to install it as a USBasp-device and upload a sketch. Works fine.
Than I disconnected the USB-plug and wrote another sketch.
After reconnecting the USB, it's only a "unknown device" - pressing the reset switch don't help.
ArduinoIDE says: avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc .
It's like the bootloader isn't enabled anymore!?
After re-burning the bootloader, I can upload exactly one sketch that runs until the Atmega is connected to power, but after uploading the sketch, Arduino couldn't find the device anymore... smiley-sad

Have you any clue for me, Osgeld?
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

not I, I havent even heard of a Metaboard until this post, dont fret though I am sure someone has
Logged


DE
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found my mistake! smiley

The HFuse was a little bit wrong, it should be 0xc8, that change sets BOOTRST=0 (programmed).
After pressing the Reset-Button, the Atmega jumps into bootloadermode and I'm able to upload new programs via USBasp.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi guys , My problem may be little irrelevant related to post here, for that sorry, but i accidentally got my ic atmega 328 burnt. Now i want to replace this with new atmega 328.Now since i have board with burnt Atmega I can't use arduino as isp to burn bootloader in new Atmega.correct me if I am wrong but I think i can directly burn Bootloader selecting TOOLS>>BOOTLOADER>>>AVR ISP in Arduino IDE. I am using arduino uno board.
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if you have an avrisp handy then yes you can
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Osgeld it may sound pretty dumb but as i am very new to arduino... Doesn't arduino board has its own avrisp? can you explain any method to burn bootloader in new Atmega!!
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the arduino board uses the avr chip that is then programed to act like an avrisp, since you dont have one either bootloaded or working
Logged


Pages: [1]   Go Up
Jump to: