Hi All,
I've built a custom board with a mega2560 on it. Extern crystal etc, some LEDS, buttons, UARTS, the works.
Programming is via ISP and working fine.
Everything is working to plan so far, except the EEPROM.
using EEPROM.write and EEPROM.read always returns 255.. nomatter what I write to it.
If i load up the eeprom example scripts, the same thing. always reads 255.
Some more info..
Mega2560 on custom board
I used the 'burn arduino bootloader via AVRISP mkII" When I first put the board together to set the fuses etc..
Now I am using the arduino IDE and uploading via ISP.
#include <EEPROM.h>
int addr =0;
void setup() {
}
void loop() {
EEPROM.write(addr, addr);
addr++;
if (addr == 254) {
addr = 0;
}
}
Any ideas where I'm going wrong. I have to assume its a fuse or something odd, but if I used the 'burn bootloader' I should be ok?