Does ESP8266 actually have hardware I2C?/ESP8266有硬件I2C吗?

thuwrx10
Posts: 10
Joined: Wed Aug 19, 2015 3:59 pm

Does ESP8266 actually have hardware I2C?/ESP8266有硬件I2C吗?

Postby thuwrx10 » Sat Aug 29, 2015 12:55 pm

Found that the I2C code in Non-OS SDK 1.3 is actually a bit-bang method. Is it that ESP8266 doesn't have peripheral circuit to perform I2C function? Or the hardware I2C driver code is still under development?

刚发现非实时操作系统SDK 1.3版里的I2C驱动实际上是软件I2C。ESP8266是不是没有硬件I2C的电路?还是硬件I2C的驱动仍在开发中?

eriksl
Posts: 155
Joined: Fri May 22, 2015 6:22 pm

Re: Does ESP8266 actually have hardware I2C?/ESP8266有硬件I2C吗?

Postby eriksl » Sun Sep 13, 2015 4:17 pm

Good question.

I have never seen any hard evidence that there is any I2C hardware support available. So I guess we'll have to fallback to bit-banging. Which actually works quite well though (if implemented right...)

ikasamo
Posts: 1
Joined: Thu Jan 14, 2016 11:01 pm

Re: Does ESP8266 actually have hardware I2C?/ESP8266有硬件I2C吗?

Postby ikasamo » Tue Jan 19, 2016 3:48 pm

I had the experience to look for it too, but I never found it.
The specification for the hardware driven I2C is not written in datasheet. There are pin assignments only. The I2C driver code of the Non-OS SDK 1.5.1 in driver folder uses bit-bang method. Usually, some dedicated registers for I2C stored in the chip, and software will control the register to communicate with peripherals. If ESP8266 adopts similar manner, some kind of access method should be specified in datasheet.
Meanwhile, I can see that the SDK driver code of SPI and UART are accessing the dedicated register.

Will mean what is this?

ESP_Faye
Posts: 1640
Joined: Mon Oct 27, 2014 11:08 am

Re: Does ESP8266 actually have hardware I2C?/ESP8266有硬件I2C吗?

Postby ESP_Faye » Wed Jan 20, 2016 2:39 pm

Hi,

Sorry that ESP8266 do not have hardware I2C.

Users can refer to esp_iot_sdk\examples\driver_lib\driver\i2c_master for software I2C.

Thanks for your interest in ESP8266 !

eriksl
Posts: 155
Joined: Fri May 22, 2015 6:22 pm

Re: Does ESP8266 actually have hardware I2C?/ESP8266有硬件I2C吗?

Postby eriksl » Wed Jan 20, 2016 6:47 pm

I already accepted the fact. It's not a big deal because the cpu is fast enough to reach > 100 khz using bit banging. Also a software implementation gives room for a better implementation (better error detection, reporting and recovery, see the code in my project).

Who is online

Users browsing this forum: No registered users and 4 guests