#define E24C32_I2C_ADDRESS 0x50
//Write data on 5th rowWire.beginTransmission(E24C32_I2C_ADDRESS);Wire.write(0x05); //choose the 5th rowWire.write(decToBcd(10)); //write number 10 on memoryWire.endTransmission();//Read the written dataWire.requestFrom(E24C32_I2C_ADDRESS), 1); //reads one byte starting on the latest position -> 0x05newvar = bcdToDec(Wire.read());lcd.setCursor(2,3); //Set the cursor in the position number 2 (3rd char) on line 3 of the LCD.lcd.print(newvar);
Run the i2c scanner, http://playground.arduino.cc/Main/I2cScannerIf that is okay, write a byte and read a byte.Why are you using decToBcd() and bcdToDec()?I think in the history of memory chips, there has never been a memory that used bcd code to store data. Not on earth, not elsewhere in the universe.
The EEPROM happens to be on the same board as the DS1307, but they are different chips. The I2C EEPROM on the RTC board should also be used to read and write bytes.It has absolutely nothing to do with bcd code.The Arduino has also EEPROM. You can read and write bytes to it.
Why are you using decToBcd() and bcdToDec()?
nvSRAM is one of the advanced NVRAM technologies that is fast replacing the BBSRAMs, especially for applications that need battery free solutions and long term retention at SRAM speeds. nvSRAMs are used in a wide range of situations--networking, aerospace, and medical, among many others --where the preservation of data is critical and where batteries are impractical