On my latest board based on the ATmega2560 I’ve been struggling with getting software running on it, the Arduino bootloader won’t upload without giving a mismatch and sketches directly programmed through a USBasp interface won’t run at all.
When burning the bootloader it gives this error:
avrdude: verification error, first mismatch at byte 0x1e000 0xff != 0x0d
I have read through a bunch of thread about this verification error but most of the talks about “Arduino as ISP” and this is purely about uploading the bootloader to the MCU with a USBasp interface. I have another board based on the ATmega644PA which works with the same basic circuitry (see attachment) and it runs fine, both accepts and runs the bootloader and sketches when they are directly uploaded via the USBasp.
Is there any big difference between these MCUs and how they work that I have missed out on?
And why won’t it run the simple “Blink” sketches I’ve uploaded, neither the standard “Blink” nor the one I wrote that flashes all digital pins shows anything on the MCU pins. I can read and verify the code written to the flash memory through eXtreme Burner - AVR which proves it has been written in the flash correctly.
What can be wrong? I’m leaning towards circuit fault or fuses set in a wrong way; but the circuitry have been used on another board with no problems so I don’t really have a clue. And that board also runs the MCU with the default fuses set.
What can stop the MCU from running? Any fuses that needs to be set thats not set by default?
A funny thing is that after the bootloader fails writing to memory (takes about 5min before the IDE gives the error) the TXD0 line goes high…which proves somethings been programmed in and runs…nothing I’ve been able to mimic with my own code…
Would appreciate as much help as I can get