I2C Communication with other than designated pins – electroSome https://electrosome.com/topic/i2c-communication-with-other-pins/feed/ Sat, 18 Mar 2023 04:38:59 +0000 https://bbpress.org/?v=2.6.9 en-US https://electrosome.com/topic/i2c-communication-with-other-pins/#post-15777 <![CDATA[I2C Communication with other than designated pins]]> https://electrosome.com/topic/i2c-communication-with-other-pins/#post-15777 Tue, 18 Dec 2018 11:52:39 +0000 goutham I am using PIC 18F87k90. Is it possible to do serial I2C communication with other than SDA and SCL pins. Can I use PGD and PGC pins ?

]]>
https://electrosome.com/topic/i2c-communication-with-other-pins/#post-15804 <![CDATA[Reply To: I2C Communication with other than designated pins]]> https://electrosome.com/topic/i2c-communication-with-other-pins/#post-15804 Fri, 21 Dec 2018 11:44:02 +0000 Ligo George I think the controller doesn’t have any option to change the SCL, SDA lines to PGD, PGC. So only option remaining is to use Software I2C.

  1. In your code you can program PGD, PGC lines as GPIO.
  2. You need to make SCL, SDA lines as Inputs (High Impedance state) when you need to drive it HIGH.
  3. You need to make SCL, SDA lines are Output LOW, when you need to drive it LOW.
  4. Basically you need to write entire I2C HIGH LOW signals using GPIO registers.
]]>