I2C EEPROM on uPy/ESP8266?
Re: I2C EEPROM on uPy/ESP8266?
Hmm... did you commit your write in the Arduino program?
Re: I2C EEPROM on uPy/ESP8266?
Not sure about commit but here is write code.
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.write(data);
Wire.endTransmission();
delay(5);
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.write(data);
Wire.endTransmission();
delay(5);
Re: I2C EEPROM on uPy/ESP8266?
I have no idea if there should be a separate commit command, I'm just shooting in the dark here, but it looks like it's not getting commited...
Say, what happens if you write to the memory using Arduino, then disconnect it, re-connect and read using Arduino?
Say, what happens if you write to the memory using Arduino, then disconnect it, re-connect and read using Arduino?
Re: I2C EEPROM on uPy/ESP8266?
That's fine. I used arduino to write the first 200 memory locations on the eeprom. Then read them back. Disconnected arduino and power to eeprom. Reconnected and booted a new sketch to read only and it was all correct. Then tried to read 1 memory location with ESP which returned xff. Tried again with arduino and all eeprom memory returned 255.
Re: I2C EEPROM on uPy/ESP8266?
Does that also happen when you don't actually perform any read commands, and only connect the chip to the esp8266?
I'm assuming with Arduino you are powering the EEPROM with 5V. Are you also powering it with 5V when connected to the ESP8266?
I'm assuming with Arduino you are powering the EEPROM with 5V. Are you also powering it with 5V when connected to the ESP8266?
Re: I2C EEPROM on uPy/ESP8266?
Powering chip with 3.3v only. Yes....the chip changed by just booting up ESP with chip connected. Will try tomorrow without boot.py or main.py to see if something in there is causing problems.
Re: I2C EEPROM on uPy/ESP8266?
Can you try to power it with 5V when connected to the esp8266? (you can do it safely with i2c, as long as the pullup resistors are still to the 3.3V line).
Also, which pins are you using for I2C? There is a kind of tradition for using pins gpio5 for scl and gpio4 for sda -- they are relatively safe. If you use gpio2, you have to be aware that there is some UART traffic on that pin when the module boots -- that may be sending random commands to your EEPROM and, possibly, deleting its contents.
Also, which pins are you using for I2C? There is a kind of tradition for using pins gpio5 for scl and gpio4 for sda -- they are relatively safe. If you use gpio2, you have to be aware that there is some UART traffic on that pin when the module boots -- that may be sending random commands to your EEPROM and, possibly, deleting its contents.
Re: I2C EEPROM on uPy/ESP8266?
Hello,
Hmmm, I'm using this kind of module;
(not an ad, just to show you the picture)
http://www.terapeak.com/worth/at24c256- ... 653621371/
My guess is I don't need pull-up resistor. I'm right?
Hmmm, I'm using this kind of module;
(not an ad, just to show you the picture)
http://www.terapeak.com/worth/at24c256- ... 653621371/
My guess is I don't need pull-up resistor. I'm right?
Re: I2C EEPROM on uPy/ESP8266?
Hard to say without a schematic.
Re: I2C EEPROM on uPy/ESP8266?
I have the same module and can confirm it has 2x 10k pull up resistors.
Schematic can be found here: http://arduinolearning.com/learning/bas ... eeprom.php
Schematic can be found here: http://arduinolearning.com/learning/bas ... eeprom.php