Starting Program Mode - Failed, result = 0x00
Can someone please explain the error codes for optiloader?
Each command sent to the AVR being programmed is a 4-byte SPI command. The third and fourth byte sent are supposed to return data as well, and the value printed is the concatenation of those two bytes.
The response on the third byte should be 0x53 for the "Start Programming" command; Getting a value of zero means that either the chip isn't responding at all (The "Start programming" command is the first command issued), and/or that something is wrong with the wiring...
Thanks a lot westfw the wiring seems ok, I will give Nick's one a try, if that doesn't work ( I don't think it will though the chip is probably bricked) I will just try to directly burn the optiboot hex from the superpro programmer in my uni on monday.
Does anybody know if samples sent out from Atmel are fused to work without an external clock? I tried flashing it without the crystal and caps and got the same error code as the OP got. Hopefully I didn't brick it. I did check my wiring at least 5 times.
The only thing line that shows up on the serial is "Atmega chip detector."
UPDATE: perhaps this is what I need to do.
"As an alternative to a crystal or resonator, the sketch also outputs an 8 MHz clock on pin D9 of the programming board (using Timer 1). Thus you just need to connect D9 on the programming board to XTAL1 of the target board and this will provide a clock signal, enabling this sketch to run."
Nicknml:
Does anybody know if samples sent out from Atmel are fused to work without an external clock? I tried flashing it without the crystal and caps and got the same error code as the OP got. Hopefully I didn't brick it. I did check my wiring at least 5 times.
It's been stated that AVR chips ship with the fuse bits set for internal R/C 8 Mhz clock enabled and /8 prescaler enabled, so an effective clock rate of 1 Mhz. Once the fuse bits are burned it expects an external resonator then such a resonator must be present for anything useful to happen.
The bootloader seems to be present, however its MD5 sum does not match any on my page (not that this proves a lot). Either change the fuse, or add a crystal, to make it work.
The reason that I'm flashing the chip is to have a backup should I ever brick the chip on my UNO in the future, so in that case shouldn't the fuse be set to expect an external crystal?