Hi!
I've made a board with an atmega2560. I'm trying to upload the bootloader with another arduino used as ISP and I get this error:
avrdude: verification error, first mismatch at byte 0x3e000
0x0d != 0xff
avrdude: verification error; content mismatch
but the led on pin 13 digital blinks. So, I tried to upload a sketch and it works only the first time!
If I try twice it fails with a timeout error.
Can somebody help me?
After you load ArduinoISP, are you disabling auto-reset? If the host Arduino resets then the bootloader will be in control, not the ArduinoISP sketch. One easy way is to hook a 1 to 2 microfarad capacitor between Reset (+) and Ground (-) on the host Arduino after you upload ArduinoISP.
I'm not entirely clear on the problem... Did you burn a bootloader without error?
You can use the ArduinoISP to upload sketches but I think you need the bootloader to turn control over to the sketch on startup. If the error was with burning the bootloader you should get that fixed first.
No...that's the first problem...when I burn it I get the error in my first post.
I have also tried to upload a sketch via usb (with ft232) and it succeeded, but if I try to upload it again it fails.
I made few tests and I I can upload a sketch only ones after the bootloader, but I think it is a bootloader-related problem because of that error...
The wires are long about 70cm...mmh..is it too much?
I've never used anything longer than about 20cm so I can't say for certain if 70cm is or is not a problem. I can say that 20cm has been a good choice for me.
At this point, you nothing to lose... Try shorter wires. Carefully check all connections.
I have already tried this, too.
Do you think that using avrdude directly without the ide could be a solution for the boot loader error?
I searched on web about this problem and I found another person who can upload a sketch only ones and was a problem with fuses...
This is the link: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1268700386/0
"After programming the bootloader (with the STK500 programmer), I remove the ISP cable and move the serial connector to the second DB9 on the STK500. This port is cabled into the '328 via a 2 wire jumper (rx/tx). I then use the Arduino IDE to upload the sketch. It works once, but only once."
If that is what you are doing, using a serial connection to upload sketches and not the ICSP connection, you need to manually reset the target system just before the sketch loads. That is what the auto-reset on the Arduino does for you. To implement auto-reset on a target machine you need the DTR signal from the PC to get to the reset pin through a capacitor.