camilozk:
ey guys!
I am trying a USBasp that I got following the information on this post.
first:
Tools->Board->Arduino Mega
Tools->Programmer->USBasp
Tools->Burn Bootloader
It says "done burning bootloader", but also says "avrdude: warning: cannot set sck period. please check for usbasp firmware update." Arduino´s led start to blink
second, I try to upload "blink":
Tools->Board->Arduino Mega
Tools->Programmer->USBasp
File->Upload Using Programmer
It says "done uploading", and again also says "avrdude: warning: cannot set sck period. please check for usbasp firmware update." There is no blinking in the led, so the sketch is not working.
if after this I connect the arduino again via usb and try again to upload "blink" via AVRISP mkII, it gets stuck in the uploading. "avrdude: stk500v2_getsync(): timeout communicating with programmer"
if I try to burn bootloader, it says "error while trying to burn bootloader" - "avrdude: usbdev_open(): did not find any USB device "usb" Error while burning bootloader."
How can I save my board?
I saw that @johnwasser said "Fix the auto-reset and you should get the bootloader to work more than once." but I dont know what that means...
Your board is fine, everything you have described is expected.
When you upload a sketch using "upload using programmer", the bootloader is overwritten (this is a limitation imposed by Atmel - you can't erase part of the flash when programming via ISP programmer, erase is all or nothing (unlike via self programming used by the bootloader), so it takes out the bootloader too. This is a feature, it's related to how lockbits work to keep code from being extracted). Thus, after uploading blink using USBAsp, normal upload should fail.
The SCK speed warning should be ignored. There was a project to make a better USBAsp firmware, but it hasn't finished as far as I know - and the other available firmware that does support sck speed setting has problems). I've seen a number of people complain that they tried upgrading it, and it broke all sorts of stuff.
You did not attempt to program it using an AVRISP MKII. The AVRISP MKII is a physical device, like the USBAsp, only more expensive, it does the same thing.
When you upload normally (by clicking the upload button), the Tools -> Programmer selection is ignored for boards that have a bootloader.
When you attempted to burn bootloader with the other programmer selected, you correctly received an error, since you did not have an AVRISP MKII connected to your computer.
To "save" your board, just burn bootloader with USBAsp like you did here, and don't upload a sketch using the USBAsp.