This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to read/write to a AT25020 EEPROM using SPI

Hi All!

I am using C167CR-LM microcontroller with 2K serial EEPROM (AT25020). I read the datasheet of the same and from what I understand to read the serial EEPROM I need to first pull CS low, write the command to read then pass the address and then write some garbage into the EEPROM to shift the clock and get the data out. I did exactly the same and had no luck.

Second I wanted to write into it and followed the write sequence described, but was also out of luck.

Can any one help me with a example code in C. I am using the Keil C166 compiler tool. I searched the web for some examples to write and read from serial EEPROM's but could not find any. I would be very glad if anyone can point to me some.

Regards

Kumaran