Simple and Working Circuit to Control a 24C04 IC Using Arduino (Part 1 of 7)

<<<< Previous : Connect 16 Light Sensors to 5 Digital Pins of Arduino Mega

24C04 is a serial electrically erasable and programmable read-only memory (EEPROM) which provides 512 bytes (512 * 8 = 4096 bits) of memory. Microcontrollers on various arduino boards have different amounts of EEPROM. ATmega328 has 1024 bytes of memory. ATmega168 and ATmega8 have 512 bytes of memory. Similarly, ATmega1280 and ATmega2560 has 4096 bytes (4 KB) of memory. We had already seen the tutorial of writing and reading data in this built in EEPROM. But, this EEPROM memory has a specified life of 100,000 write/erase cycles, so we need to be careful about how often we write to it. To avoid this problem, we are using external EEPROMs like 24C04, 24C08 and 24C16. These ICs are highly reliable and provides an endurance of 1 million write cycles. Since it works based on the I2C protocol, only two digital pins of arduino board is required to read and write data to 24C04. A circuit for writing and reading data from 24C04 is shown below.

Circuit to Read and Write Data to a 24C04 IC

Circuit to Read and Write Data to a 24C04 IC

From the circuit it is clear that, we need only a little time to complete such a circuit. But, we have to spend a lot of time to develop a program to write and read data to the 24C04. Programming arduino for 24C04 is a bit complicated and you must read the datasheet of 24C04 which will give you a clear idea about the working of 24C04. I spend around one month to analyse the datasheet and to develop the program. So, if you find it difficult to understand the datasheet during initial reading, don’t left it. Try to spend more and more time for the datasheet.

Pin out Diagram of 24C04

24C04 Pin Out Diagram

24C04 Pin Out Diagram

Arduino program to write 170 (1 0 1 0 1 0 1 0) in the 3rd memory byte (total 512 bytes) of 24C04 is given in the next part.

Continued in Next Part (Part 2) >>>>

(Visited 5,834 times, 1 visits today)
paulpp644
A deep electronic enthusiast who spent most of my time for electronic experiments. I am also interested in publishing my experiments in my blog for helping other electronics enthusiasts.