I2C EEPROM on uPy/ESP8266?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
deshipu
Posts: 1348
Joined: Thu May 28, 2015 5:54 pm

Re: I2C EEPROM on uPy/ESP8266?

Post by deshipu » Sun Jan 29, 2017 1:57 pm

Do you have a logic analyzer with which you could look at the signals and compare them?

User avatar
mcauser
Posts: 404
Joined: Mon Jun 15, 2015 8:03 am

Re: I2C EEPROM on uPy/ESP8266?

Post by mcauser » Sun Jan 29, 2017 8:08 pm

Are you connecting directly to an EEPROM IC, or is it on a module board with a few resistors? I2C needs pull-ups. Don't suppose you have a Saleae Logic (or clone) logic analyser?

mikruth
Posts: 18
Joined: Wed Jan 11, 2017 6:00 pm

Re: I2C EEPROM on uPy/ESP8266?

Post by mikruth » Mon Jan 30, 2017 9:52 am

Sorry, don't have a logic analyser. I am connecting directly to an eeprom chip via 4.7k resistors. Have tried other values, other frequencies and two different eeproms which both work with Arduino.

fdufnews
Posts: 29
Joined: Mon Jul 25, 2016 11:31 am

Re: I2C EEPROM on uPy/ESP8266?

Post by fdufnews » Mon Jan 30, 2017 10:21 am

Have you wired pullups resistors on SDA and SCL lines?

User avatar
mcauser
Posts: 404
Joined: Mon Jun 15, 2015 8:03 am

Re: I2C EEPROM on uPy/ESP8266?

Post by mcauser » Mon Jan 30, 2017 12:18 pm

I recommend grabbing a Saleae Logic. Very handy little logic analyser. I use mine all the time. If $109 is a bit much to swallow, $9 for a clone that works with the same software. If you can afford it, however, support the team by buying a legit board.

User avatar
deshipu
Posts: 1348
Joined: Thu May 28, 2015 5:54 pm

Re: I2C EEPROM on uPy/ESP8266?

Post by deshipu » Mon Jan 30, 2017 12:39 pm

mikruth wrote:Sorry, don't have a logic analyser. I am connecting directly to an eeprom chip via 4.7k resistors. Have tried other values, other frequencies and two different eeproms which both work with Arduino.
I think you got this wrong. You shouldn't be connecting *through* the resistors. The resistors should be pulling up the lines (conencting them to vcc).

User avatar
mcauser
Posts: 404
Joined: Mon Jun 15, 2015 8:03 am

Re: I2C EEPROM on uPy/ESP8266?

Post by mcauser » Mon Jan 30, 2017 12:48 pm

Image

Like this, where Rp are your 4.7k pull-up resistors.

User avatar
Roberthh
Posts: 1648
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: I2C EEPROM on uPy/ESP8266?

Post by Roberthh » Mon Jan 30, 2017 1:30 pm

The picture is OK, but please connect the resistors to 3.3V, the Vcc of the ESP8266.

mikruth
Posts: 18
Joined: Wed Jan 11, 2017 6:00 pm

Re: I2C EEPROM on uPy/ESP8266?

Post by mikruth » Mon Jan 30, 2017 4:05 pm

Yes, I am connecting with pull-up resistors. After more tests I find if I write the eeprom with Arduino and only read it with ESP the values are all xff however, if I then read the eeprom with Arduino, all the memory has been changed to xff.

mikruth
Posts: 18
Joined: Wed Jan 11, 2017 6:00 pm

Re: I2C EEPROM on uPy/ESP8266?

Post by mikruth » Mon Jan 30, 2017 4:11 pm

Sorry didn't make that very clear. I wrote random values to eeprom with Arduino and the values read back were OK. After trying to read them on the ESP all I got was xff at each memory location. When read again on the Arduino all addresses returned xff.

Post Reply