Go Down

Topic: atmega328-pu bootloader via usbasp (Read 1 time) previous topic - next topic

mrserii

hi guy's,

im just finished to print my first pcb circut, its a simple connector between the chip and my atmega with 16mhz reasonator + pf capacitors.

eXtreme Burner - reads the chip.

im using arduino-028 ide, the last version ask me to upgrade the usbasp.

i do the change for the non p version, it dosent give any errors when im try to upload 328 bootloader but i cannot upload sketch the erro is
Code: [Select]

Binary sketch size: 1006 bytes (of a 30720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


i read a lot but cannot find the exact way to config and burn thing's,

what i shuld do?

sorry for my english - hope it will better soon.

john1993

usbasp is often used to burn bootloader but usb/rs232 port is usually used for sketches. it looks like you are telling the ide to use serial protocol (stk500) not usbasp.  if you have no usb/serial connected or set up right youll get that error. board.txt is probably set wrong for that chip.

simplex

#2
Dec 04, 2012, 03:42 am Last Edit: Dec 04, 2012, 03:58 am by simplex Reason: 1
Locate first the place where your hex code is generated.

For instance, in Arduino 1.0.1->Files->Preferences if you check "Show verbose output during compilation" you will see, amongst other things, the path of your hex file. It looks like this:

C:\Users\Victor\AppData\Local\Temp\build1325897986179133197.tmp\Blink.cpp.hex

Open the hex file with eXtreme Burner  and try to burn it in the target atmega328 using "usbasp".

By doing so you will get rid of Arduino IDE and exclude it as a source of programming errors.

There is a tutorial that might help, it uses:
- "Arduino Uno as ISP programmer" instead of "usbasp" and
- "avrdude" instead of "eXtreme Burner"
but the steps of this tutorial can quickly be adapted to "usbasp" and  "eXtreme Burner".
see: http://pdp11.byethost12.com/AVR/ArduinoAsProgrammer.htm

mrserii

thank you jhon1993 & simplex !

i didnt test it yet with a real code but it look's like arduinoupload it without any errors.

as jhon1993 say i just the protocol to usbasp .

i have few more questions for you guys:

wich bootloader the preferred for simple actions on standalone chip ?

i didnot test it many times but it's look like the is no serial monitor via usbasp, is it right ?

thank again ! photo soon

simplex


wich bootloader the preferred for simple actions on standalone chip ?

You do not really need a bootloader. Just burn with usbasp the hex code of your program directly in the target standalone chip.

Go Up