Anyone be able to point me in the right direction?
Sure. Up there, above where you type, see the two rows of icons above the smiley faces? See the one with the # on it? Use that one, and post your code.
Whilst writing out the code i realised an error, which i really thought was the problem, but since fixing it it has now made it so the positive number doesnt work either.
My code is below and is very simple...
I Declare these
//Epprom Map Address's
int BPFRM = 0;
int BPTO = 10;
//Epprom map values
int BPFRMv;
int BPTOv;
"Snippets are us" is down the road a ways. Here, we need to see all of your code.
EEPROM_writeAnything(BPFRM, -20);
This should be writing the value -20 at address 0.
BPFRMv = EEPROM_readAnything(BPFRM, BPFRMv);
This is reading from address 0, and putting the result in BPFRMv. Then, it assigns the return value to BPFRMv, overwriting the value that it read from the EEPROM.
The return value is the number of bytes read. So, BPFRMv ends up containing 2.
Psst. You to range has a size of 0, since both ends of the range are 2. The result, in the map function, will be a divide by 0, so the result of that division, and the whole map output, will be undefined.