Reading/writting the EEPROM

Hi guys! I want to read and write the EEPROM from the serial monitor. Can I write the function directly in the serial monitor (read or write) and read the value? Could you help me please?
Thanks a lot!!!

Hello and welcome,

I'm not sure what you want. If you mean to use the functions for EEPROM from command line, it doesn't work. It is C language and must be compiled and run on the Arduino.
However, it should not be a problem to write a program which would accept commands from serial line and interpret them as R/W to EEPROM.

Hi! I have a problem at the very beginning. I want to handle a 24c128 EEPROM. According to the data sheet if A0, A1 is grounded, the chip address will be "1010 0000" --> 0xA0. All 24cxx chip address begins with "1010" and arduino hadles it at "0101" (0x50) address. Why is it?

You are wrong, I2C address has just 7-bits. The address in your case for the 24C128 is [1, 0, 1, 0, 0, A1, A0] == 0x50 if A1,0 are zero. See the datasheet.

The eighth bit of the device address is the read/
write operation select bit. A read operation is
initiated if this bit is high and a write
operation is initiated
if this bit is low

I saw the datasheet. According to the I2C library written by Peter Fleury, the chip address handled as I wrote (e.g.: 24c02 is at 0xa0, and it works! I never used arduino till now and this terminology is unusual for me (like digital read/write and others).

cethal:
According to the I2C library written by Peter Fleury...

Yes, but according the library "Wire & twi" bundled with the Arduino IDE it is exactly as in reply #3.

/* 
 * Function twi_slaveInit
 * Desc     sets slave address and enables interrupt
 * Input    none
 * Output   none
 */
void twi_setAddress(uint8_t address)
{
  // set twi slave address (skip over TWGCE bit)
  TWAR = address << 1;
}