I have an 1284p on a pcb with ISP connector and use Nick's ATMega Board programmer with adjusted fuse settings (8 mhz internal clock).
Upon connecting I see
Atmega chip programmer.
Written by Nick Gammon.
Version 1.28
Compiled on Jun 5 2015 at 00:38:35
Attempting to enter programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x97 0x05
Processor = ATmega1284P
Flash memory size = 131072 bytes.
LFuse = 0xE2
HFuse = 0xDE
EFuse = 0xFD
Lock byte = 0xFF
Clock calibration = 0x91
Bootloader address = 0x1FC00
Bootloader length = 508 bytes.
Type 'Q' to quit, 'V' to verify, or 'G' to program the chip with the bootloader ...
Erasing chip ...
Writing bootloader ...
Committing page starting at 0x1FC00
Committing page starting at 0x1FD00
Written.
But then the verify starts and I get
Verifying ...
Verification error at address 1FC00. Got: 0x00 Expected: 0x0F
Verification error at address 1FC01. Got: 0x00 Expected: 0x92
Verification error at address 1FC02. Got: 0x01 Expected: 0xCD
Verification error at address 1FC03. Got: 0x01 Expected: 0xB7
Verification error at address 1FC04. Got: 0x02 Expected: 0xDE
Verification error at address 1FC05. Got: 0x02 Expected: 0xB7
Verification error at address 1FC06. Got: 0x03 Expected: 0x11
Verification error at address 1FC07. Got: 0x03 Expected: 0x24
Verification error at address 1FC08. Got: 0x04 Expected: 0x84
Verification error at address 1FC09. Got: 0x04 Expected: 0xB7
Verification error at address 1FC0A. Got: 0x05 Expected: 0x14
Verification error at address 1FC0B. Got: 0x05 Expected: 0xBE
Verification error at address 1FC0C. Got: 0x06 Expected: 0x81
Verification error at address 1FC0D. Got: 0x06 Expected: 0xFF
Verification error at address 1FC0E. Got: 0x07 Expected: 0xF1
Verification error at address 1FC0F. Got: 0x07 Expected: 0xD0
Verification error at address 1FC10. Got: 0x08 Expected: 0x85
Verification error at address 1FC11. Got: 0x08 Expected: 0xE0
Note the increasing read bytes
If I try to burn a sketch using 'Arduino as ISP' and use verbose mode I see it's writing and reading, but also a verify error with the same pattern.
What am I doing wrong ?!?!?
This is a new iteration of my pcb, and on the previous pcb (same schematic) everything was working fine. I have made 2 more pcb's (with only the power lines, mcu and capacitors) to rule out a faulty 1284p but these exhibit the exact same problem.
I tried connecting an AVR dragon using ISP to see the fuses in atmel studio, but the device programmer cannot connect to the mcu (strange as Nick's sketch has no problems)