C code for Microchip Serial EEPROM's (93LC56B)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C code for Microchip Serial EEPROM's (93LC56B)

5,582 Views
CarlFST60L_3rd
Contributor I
Hi all,

I was wondering if anyone would be so kind to post their code for running 93LC56B (or similar) microchip serial EEPROM's. I havnt used them before, and thought someone might nice enough to share their code...

If not, like the flash routines I previously posted, I will write up some basic code and hopefully save some other engineers some time...

Carl.
Labels (1)
0 Kudos
1 Reply

722 Views
bigmac
Specialist III
Hello Carl,
 
The 93C56 is a rather old serial EEPROM device that provides a "microwire" interface protocol.  This has similarities with the SPI interface, but is not the same.  It should be possible to use the SPI module in a non-standard fashion - it involves additional padding bits for the command, and from memory, the CPHA state needs to be flipped between data send and data receive.  It is also assumed that the required data organisation is 8 bits, and not 16 bits.  The other alternative for this device is the use of "bit bang" routines.
 
I have previously used the bit bang approach, but unfortunately assembly code was used, so may not be of much use to you.
 
Are you stuck with using the 93C56 device?  Another alternative might be to use a SPI compatible EEPROM device, and this should much simplify the code using the SPI module.  The 25C640 is a possible device that comes to mind.
 
Regards,
Mac
 
0 Kudos