How to read and write 24Cxx EEPROM data via SDA SCL pins

I want to read or write EEPROM 24C04 via SDA and SCL pins using arduino nano, so far I haven't found anyone who makes such a tool, how to do it, is it possible?

Use this library

1 Like

but like it can't read eeprom hex/bin files

Perhaps you could explain in detail exactly what it is you are trying to do.

okay I will explain it, I want to make a programmer tool to read and write bin/hex files using arduino. is that possible?

You wish to build a serial EEPROM programmer/reader using an Arduino Nano? One that can accept/produce hex & bin files when programming/reading?

Yes, it's certainly possible.

Your unstated design choices will determine how much work it will end up being.

Things like, will it be a standalone programmer, or will it connect to a host computer to provide the user interface? In the former case, you will have to have some method of locally accessing the files from the Nano, such as a uSD card, USB stick, that kind of thing. You know; the details.

Maybe you don't need to display it in a file, just display it in the arduino idea console, or a simple program, but so far I didn't find someone who made the same project, that's why I made this thread.

Well, I wish you good luck in your project then. It can be very satisfying to design, debug and build something on your own.

It is still not clear to me, what do you try to achieve?
EEPROM 24C04 doesn't use a file system, so it would not quite correct to talk about files. What you could to read/ write from EEPROM is just data, a several bytes or byte array. In the library above you can find an example of reading bytes from this chip.

okay I will explain in more detail,
I want to read and write hex data on eeprom, similar to As Programmer application but it uses CH304 to read or write EEPROM, but I want to read it using arduino nano.

You need two things

  1. Arduino code to read from and write to the EEPROM. You can base your code on the library mentioned by @jim-p in post #2. There are other libraries as well.
    Try to simply write some fixed values and read them back and display in e.g. serial monitor; look at some basic examples that come with the library and understand them.
  2. A program on the PC that can
    • display data that is read from the EEPROM; you might want to find a 3rd party terminal program that can save the received data to file (putty, coolterm etc).
    • send data to the arduino in a controlled way; just pumping the data from the PC to the Arduino will more than likely not work.

If your Nano is an official Nano with the FTDI serial-to-usb converter, you can use the 3rd party terminal program using Xon/Xoff for the sending. Enable Xon/Xoff in the terminal program and let the Arduino issue Xoff after receiving some bytes and Xon after processing some bytes. A Nano with CH340 will definitely not work; I think that that is a driver problem on the PC.

If you can't use Xon/Xoff, you will need to design a protocol for communication between the PC and the Arduino and use a dedicated PC application that implements that protocol; obviously the Arduino code also needs to support that protocol.
Basically you send a number of bytes to the Arduino, the Arduino writes them to the EEPROM and next confirms to the sending application that it has received and processed those bytes. Next the application can send the next bunch of bytes.

Actually, I can use CH341 to read EEPROM 404RQ (24C04), but I want to try to make a simple program without having to save it into a file, so just display it in the arduino console, that idea is enough,

Your topic title stated "read and write". I suggest (as earlier) that you start with some examples for the EEPROM.

If you still want to write to change the content, study Robin's updated Serial Input Basics; it might give you some ideas. Study it all, example 4 might get you on track.

What is 404RQ?

eeprom production of the company ST “404RQ STK934” st.com

No results found for 404RQ or STK934.

If you want to read an I2C EEPROM, install the library I show in post#2 and use one of the examples.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.