News:

  • August 21, 2026, 09:02:21 PM

Login with username, password and session length

Author Topic: Do-More / BRX I2C  (Read 8319 times)

jcottrill

  • Full Member
  • ***
  • Posts: 43
Do-More / BRX I2C
« on: April 11, 2018, 11:17:00 AM »
Are there any plans to produce an I2C POM module or are there any code samples out there for a bit-banged implementation?  There are a few I2C based sensors I'd like to integrate into my designs.  It would be nice if this was supported directly via a module and/or function but I'd shamelessly steal existing code before writing my own if someone is willing to share  :)

jcottrill

  • Full Member
  • ***
  • Posts: 43
Re: Do-More / BRX I2C
« Reply #1 on: April 11, 2018, 11:26:04 AM »
One benefit of the POM approach would be it could likely encapsulate the level shifting needed.  Not that this is a difficult task but would be nice to avoid.

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Re: Do-More / BRX I2C
« Reply #2 on: April 11, 2018, 09:03:08 PM »
Is the I2C interface the same one used by the Vex Robotics Cortex processors to talk to some IO?  I ask because as I understand it this interface was designed for internal communications and when brought out to the real world is very noise sensitive as it is very low power.

jcottrill

  • Full Member
  • ***
  • Posts: 43
Re: Do-More / BRX I2C
« Reply #3 on: April 11, 2018, 10:17:43 PM »
I am not familiar with the Vex but I2C is a standard so they should be the same.  You are correct in that it serves primarily for internal communications over short distances. 

The primary sensors I was looking to are some color and light sensors.  In our setup the sensor itself could be kept close to the PLC and fiber optics or other light pipe could transmit the light we are inspecting from the source to the sensor. 

If memory serves me right, the bus can be extended if the proper capacitance is maintained along with shielding, buffers etc.  I don't think I want to be on the far side of crazy though.  If all else fails I can add a few micros into the system to collect the data and use RS-485 to transmit back to the PLC.  It would be nice to avoid the extra micro though if reliability isn't sacrificed.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Do-More / BRX I2C
« Reply #4 on: April 11, 2018, 10:49:49 PM »
We added INI (Immediate In) in 2.2 to make it possible to bit bang. OUTI was already there. I could probably hack together a simple I2C implementation.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO