Home > Embedded Hobbyist, My Creations, Tech > Reading/Writing a Serial EEPROM chip using Arduino

Reading/Writing a Serial EEPROM chip using Arduino

November 20th, 2008

A few months ago, I had got myself some samples of serial EEPROMs. In case you are wondering what they are, the name says it all. They are Serial EEPROMs(Serial Electrically Erasable Programmable Read Only Memory). By serial I mean is that they don’t have a parallel data or address bus that we normally associate with EEPROMS. Instead, they have a serial interface and protocol to read/write data onto them.

Two of the most popular serial protocols associated with serial EEPROMs are the SPI (standing for Serial Peripheral Interface) and the I2C (Or Inter-Integrated Circuit). ( The latter is by Philips and the former is by Motorola, in case you are curious).

Anyway, the Serial EEPROM I had was as SPI one, a 25AA256 from Microchip, to be precise. Before I dived headlong into anything, I wanted to first test my EEPROM chip. So what better way than to quickly connect it with my Arduino and check.

So that is what I did. And let me tell you that I cannot take credit for any of the code this time. I found the code completely in the Arduino website. But anyway, below is a photo I took of the system.

img_0375

Readind/Writing an SPI Serial EEPROM using an Arduino. Ignore the red LEDs on the breadboard. They are from a previous project and have nothing to do with this particular demonstration.

The code for the above can be found here. I had to change a few parameters in the code for make it to work with my EEPROM. The EEPROM used in the link above had a page boudnary of 128 bytes, while the EEPROM which I had, had a page boundary of 64.  So, I did a minor change to my program by replacing ‘128′ by ‘64′.

That’s it ! It worked ! I was able to read and write into my EEPROM and it was great fun! Now with the assurance that my EEPROM was ok, I would be safely able to create my own software to read/write my EPROM.

But that’s the topic of another post. My next post would be a demonstration of my very own software to read/write into the EEPROM. Something, which I have dubbed ‘SEAShell - Serial EEPROM Access Shell’. Some slick naming, eh ? Stay tuned!

seemanta Embedded Hobbyist, My Creations, Tech , ,

  1. 8051projects
    January 16th, 2009 at 09:19 | #1

    From where you get the Arduino boards in india.

  2. February 9th, 2009 at 18:33 | #2

    I got them from US. A friend was visiting US and she got it for me.

  3. Sid
    March 24th, 2009 at 15:23 | #3

    Hello,

    You can get arduino/freeduino in india, there is a company Bhasha Technologies, which sells these boards and kits. They have an online shop (Bhasha eStore) visit http://www.bhasha.co.cc

    I recently got a Freeduino USB kit from them, and its good and its just what i wanted

  4. March 24th, 2009 at 21:27 | #4

    @Sid:
    Thanks a lot for the link!

    ~seemanta

  5. March 25th, 2009 at 08:27 | #5

    Thanks for the link.

  1. May 3rd, 2009 at 02:29 | #1