I'm as sure as I can be that there is no problem with my code.
This is what I used initially:
void Ext_Eprom_Set_Address(unsigned int Address){
Wire.beginTransmission(DISK_1);
Wire.send((byte)(Address >> 8)); // MSB
Wire.send((byte)(Address & 0xFF)); // LSB
}
When I had a problem I changed it to this:
void Ext_Eprom_Set_Address(unsigned int Address){
byte tmp;
Wire.beginTransmission(DISK_1);
byte = Address >> 8;
Serial.println(tmp);
Wire.send(tmp); // MSB
tmp = Address & 0xFF;
Serial.println(tmp);
Wire.send(tmp); // LSB
}
The serial data was correctly showing the two bytes, but still the addressing was wrong - exactly as before.
I'm sending long integers so a
usable buffer that's a multiple of 4 bytes is highly desirable.
I was aware of the 64byte paging, but as you say this is not relevant here. If I could use the 20byte (5 longs) format that I want, all the problems would go away.