ESP8266 Developer Zone The Official ESP8266 Forum 2016-10-10T21:37:43+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1640 2016-10-10T21:37:43+08:00 2016-10-10T21:37:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1640&p=10104#p10104 <![CDATA[Re: I2C pins]]>
The ESP8266 does NOT have any hardware for I2C communication. So you can implement it using software "bit banging" and when you're doing that, which I/O pin you use does not matter.

Statistics: Posted by eriksl — Mon Oct 10, 2016 9:37 pm


]]>
2016-09-22T06:33:57+08:00 2016-09-22T06:33:57+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1640&p=9915#p9915 <![CDATA[Re: I2C pins]]> https://github.com/esp8266/Arduino.git) this is possible, but the code there is very different from your SDK so copy&paste is quite impossible. I tried similar solution hacking i2c_master.h/.c but without any luck (GPIO 4 & 5 which is working with Arduino SDK). Isn't it just a matter of setting GPIO in open collector mode?

Statistics: Posted by gemborow — Thu Sep 22, 2016 6:33 am


]]>
2016-05-13T15:11:32+08:00 2016-05-13T15:11:32+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1640&p=6879#p6879 <![CDATA[Re: I2C pins]]> Just can use GPIO14 and GPIO2

Statistics: Posted by ESP_Vincent — Fri May 13, 2016 3:11 pm


]]>
2016-01-18T19:51:10+08:00 2016-01-18T19:51:10+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1640&p=5424#p5424 <![CDATA[I2C pins]]>
Is it possible to use GPIO13 and GPIO12 for I2C communications? I'm not sure if it's working on these pins.
I'm using a ESP12 board and SDK v1.5.1 .

I've changed the SDA pin to 13 and SCL to 12 in i2c_master.h file but no response is received.

Code:

#define PERIPHS_IO_MUX_GPIO13_U          (PERIPHS_IO_MUX + 0x8)
#define PERIPHS_IO_MUX_GPIO12_U          (PERIPHS_IO_MUX + 0x4)

#define I2C_MASTER_SDA_MUX PERIPHS_IO_MUX_GPIO13_U
#define I2C_MASTER_SCL_MUX PERIPHS_IO_MUX_GPIO12_U
#define I2C_MASTER_SDA_GPIO 13
#define I2C_MASTER_SCL_GPIO 12
#define I2C_MASTER_SDA_FUNC FUNC_GPIO13
#define I2C_MASTER_SCL_FUNC FUNC_GPIO12


Sensor read code on i2c:

Code:

i2c_master_start();
  i2c_master_writeByte(_i2caddr);
  uint8 ack = i2c_master_getAck();

  if (ack) {
    char info[50];
    os_sprintf(info, "addr %d not ack for reset\r\n", _i2caddr);
    uart0_sendStr(info); 
    i2c_master_stop();
    return ;
  }

Statistics: Posted by systemsconnect — Mon Jan 18, 2016 7:51 pm


]]>