el_supremo
Well-known member
I've spent much of today trying to figure out why I couldn't erase a 24LC1026 eeprom properly. The abbreviated story is that the page size on those eeproms is 128 bytes and the chip can handle 128 bytes in one begin/end transmission cycle so I was writing 128 bytes in one go. But it only ever erased the first 32 bytes of each page.
I thought it was a timing issue but it finally dawned on me that the Wire library might be the problem.
Sure enough, in teensy's \arduino-1.0.3\libraries\Wire\Wire.h we have:
I changed it to 128 and all is now well. The Arduino Wire library also sets the buffer length to 32.
Pete
I thought it was a timing issue but it finally dawned on me that the Wire library might be the problem.
Sure enough, in teensy's \arduino-1.0.3\libraries\Wire\Wire.h we have:
Code:
#define BUFFER_LENGTH 32
Pete