Closed SpaceCommanderTravis closed 4 years ago
Your last line is correct, but you are not reading the first 64 bytes(8 bits), but all 64 words(16 bits). A doubleword is 32 bits.
This could probably easily be solved by filling the buffer as follows(Though I haven't tested this, I don't have my arduino handy at the moment):
byte readBuffer[128];
for(int i = 0; i < 64; i++) {
word r = e.read(i);
readBuffer[i*2] = r>>8; // Assuming the high byte of the word comes first
readBuffer[i*2 + 1] = r;
}
I have now tested this in 8 bit mode using a 93C46D EEPROM. All five functions - read, write, erase, write_all and erase_all appear to work fine. I've had a lot of fun with this library. Thanks for writing it.
Please go easy on me, this is my first interaction with Github. I'm learning to access the 93C46 eeprom embedded in a Datakey serial memory key. These operate in 16x64 bit mode. I've installed this library and I'm playing about with the example read sketch. But I dont understand. In 16x64 mode, it only reads the first 64 bytes of the buffer. Surely, it should read 128 bytes? The data is arranged in 64 "doublewords" (an old IBM assembler term there), but this is still 128 bytes (or words) of data to read. My understanding from the chips datasheet is that the only difference between 128x8 and 64x16 is the size of then control messages in and out. The actual storage is still the same - 1024 bits.