Does ESP8266 actually have hardware I2C?/ESP8266有硬件I2C吗?
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的驱动仍在开发中?
刚发现非实时操作系统SDK 1.3版里的I2C驱动实际上是软件I2C。ESP8266是不是没有硬件I2C的电路?还是硬件I2C的驱动仍在开发中?
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...)
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...)
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?
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?
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 !
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 !
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 3 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.