Go Down

Topic: Program an Arduino using USBasp (Read 4799 times) previous topic - next topic

vick5821

Hey there, I got an USBasp programmer. I know that to upload sketch to arduino board , not necessary I have to use USB cable. I can also use this USBasp programmer right ? So, if I wanted to use this programmer to program my arduino atmega 328, do I need to do any modiciation ? Or I simply just plug in the 6 pins header and click File--> Upload using programmer ?

This method apply to any AVR chips? with or without bootloader in it ?

Thank you for the help

johnwasser

My USBasp programmer came with a 10-pin ICSP cable.  You'll need a 10-pin to 6-pin adapter.

If you use a factory fresh AVR chip in your Arduino it will, by default, run at 1 MHz instead of 16 MHz.  To set the fuses correctly for the 16 MHz crystal/resonator you will want to burn the bootloader:

Tools->Board->Arduino UNO  (or whatever Arduino board you are programming)
Tools->Programmer->USBasp
Tools->Burn Bootloader

Then you can upload sketches with:

Tools->Board->Arduino UNO  (or whatever Arduino board you are programming)
Tools->Programmer->USBasp
File->Upload Using Programmer
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

vick5821

Yea, I have the 10 pins to 6 pins adapter. So, means every AVR chip that I want to program using arduino IDE I must burn bootloader ? Burning bootlader means that I can program my chip using arduino language and not those from AVR studio ?

vick5821



Hey, help. Suddenly I cant progrram my arduino. Why ??? Please help me.

Thank you



Hey, help. Suddenly I cant progrram my arduino. Why ??? Please help me.

Thank you


Do you remember which direction you hooked the 6-pin cable to the ICSP?  There is a pin 1 designated with a little dot on the UNO.  The colored wire (Red or Black) on the ribbon will tell you which side pin 1 is on the connector.

After that, check if it will upload via programmer (Try a slow clock, if you have a jumper for it).  If not, re-burn your bootloader through the Arduino IDE.
http://www.spcomputing.com

teding

#5
Aug 05, 2012, 08:51 pm Last Edit: Aug 06, 2012, 02:24 pm by teding Reason: 1
I do have the same problem,
If I upload a sketch by Uspasp from the IDE (v1.0.1), the sketchs work fine.
But I can't upload sketches anymore by the arduino ide.
I think the bootloader is over writen.
Burning a new bootloader, solves the problem.
[edit]
If you upload by extrenal programmer, you erase the flash memory, and then uploud the sketch.
(so you loose the bootloader). Is there a option to prevent that ?

johnwasser


I do have the same problem,
If I upload a sketch by Uspasp from the IDE (v1.0.1), the sketchs work fine.
But I can't upload sketches anymore by the arduino ide.
I think the bootloader is over writen.
Burning a new bootloader, solves the problem.
[edit]
If you upload by extrenal programmer, you erase the flash memory, and then uploud the sketch.
(so you loose the bootloader). Is there a option to prevent that ?


It sounds like you are saying:  "When I burn a fresh bootloader it only works once through USB."  That is a symptom of the auto-reset circuit not working.  Fix the auto-reset and you should get the bootloader to work more than once.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

nightcrawler218




Hey, help. Suddenly I cant progrram my arduino. Why ??? Please help me.

Thank you


uhen uploading the program GOTO File>Upload Using Programmer.
"Imagination is more important than knowledge."
-Einstein

mcnobby

Very useful post, my USBasp is now running perfectly after pointers from here. Thanks
while (z--) { snoreEvenLouder(); }
www.smartshow.lighting - www.dmx512.lighting

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy