i2c read limitations

I’m trying to figure out if there’s a byte read limit in the Wire library or if it’s a limit of a MCU like the 328. When I set it to the next highest read chunk at 64bytes, it only reads the first 32 until the eeprom address is updated. The end of the receive seems to cause the eeprom to advance a couple addresses so I have waste time to reset it at each loop.

The purpose is to load a 1K frame buffer for a 128x64 LCD from a 24C256 eeprom as fast as possible. I have it down to around 85ms loading the buffer from eeprom then 40ms blind dump to the screen. It can save the 40ms by loading directly to the screen but it looks smoother when the buffer is used. I would guess it can only save another 2ms at most but faster is always better.

My main goal is to reduce the 32 eeprom address calls if possible.

//load eeprom to frame buffer at 32byte chunks
void GLCDloadFrame(int _page){
byte rvalue;
for(int i=0;i<=1023;i+=32){
eeprom1_set_addr(EEPROM_24C256B, (2048+i+(_page*1024)));//2048 base address @ 1024 page size
Wire.requestFrom(EEPROM_24C256B,32);
for(int j=0;j<=31;j++){
if (Wire.available()) frameBuffer[i+j] = Wire.receive();
}
}
}

Have you had a look at the source of the Wire library?

I just checked it again and can’t believe I overlooked the buffer length define.