Go Down

Topic: Some random question (Read 426 times) previous topic - next topic

Vincent19

I uploaded the atmega 8 bootloader
using usbasp
then I load program using usbasp too
before that , once after burnt the bootloader,when I press reset button, the led at pin 13 blink a little while
but once loaded program using usbasp programmer, it seems like the bootloader gone

because when I press the reset ,the led at pin 13 wont blink

And when I change to USB, I cant upload the program because the bootloader is gone :(
What problem is that ?

Thanks

johnwasser


once loaded program using usbasp programmer, it seems like the bootloader gone


Yes, if you load a sketch with a programmer it will erase the bootloader.  Your sketch gets control immediately on power up or reset.  If you then want to be able to upload sketches via USB you have to re-burn the bootloader.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Vincent19

Why it is like this ??

Can it be solved ?

Thank you

kf2qd

Yes, load the bootloader and then load programs using the Serial or USB connection. If you load hex files using avrdude and usbasp then the bootloader is overwritten. Decide how you want to load programs. Using serial/USB using the bootloader or the usbasp and no bootloader.

Vincent19

Either one only ? Can it be like I can use both ways to program ? First I used us asp then later on I do not need to burn again the boot loader to enable to load program using USB cable ?

Thank you

Go Up