MicrowireEEPROM
MicrowireEEPROM copied to clipboard
Bug: writeEnable doesn't work with Adress widths greater than 8 bits.
An 93LC86C EEPROM has an address width of 10 or 11 bits depending upon configuration. Further the writeEnable command expects two 1's as the MSB of data in combination with the Op code. The writeEnable function sends 0xFF as data to the transmit function, i.e only eight bits of 1's. For and address width greater than eight, leading zeros are then transmitted as MSB's. The fix is to change the data value being sent writeEnable to the transmit function from an 8 bit value of 0xFF, to a 16bit value of 0xFFFF.
void MicrowireEEPROM::writeEnable(void) { send_opcode(0); //--------------------------------- //transmit(0xFF, ADDRWIDTH); Original statement. // //MG - Increased 1's data from 8 bits to 16bit //EEPROM 93LC86 has 11/10 bit Address width //0xFF is 0000 0000 1111 1111 results in sending //leading zeros for ADW's > 8 //0xFFFF fills all 16 bits of the INT with 1's //0xFFFF = 1111 1111 1111 1111 transmit(0xFFFF, ADDRWIDTH); digitalWrite(CS, LOW); }
hi @MarkGen Have you succeeded in read/write 93C86, I still haven't managed to do it... thanks,
hi @tim0s did u successful try with 93cc76/86 ?
I did write successfully to 93C86B. But it was necessary to apply the patch that @MarkGen posted. i.e. change transmit(0xFF, ADDRWIDTH); to transmit(0xFFFF, ADDRWIDTH);
hi @mprt ... nice info, thanks your sharing