How difficult is it to get the i2c driver working on other pins (than the ones that are normally used for i2c0 and i2c1), lets say to introduce a 'third' bus i2c2 that uses gpio's of my own choice?
My problem is this: I do not want to change my board, to remove resistors, since i still do want to use the regular i2c for communicating with 'normal' i2c devices, like an arduino.
I'm trying to get the lego mindstorm ultrasonic sensor to work on a pi.
However, the folks at lego for sure have a different opinions about i2c: their speed is low (9600 Bd), their pull-up's are very high (82k), but what really sucks is that there is a 4k7 ohm in series on the outputs of these sensors. So they are not exactly 'open drain' outputs anymore (which means the sensor is only able to pull the lines down to a level (4k7/(1k8+4k7))vcc (2.4v = still recognized as 'high')
i looked for possible solutions:
- a level converter that also isolates the i2c busses with respect to impedance, for example with the
TXS0102, but no: all these converters physically connect the busses via a switch (fet) during their 'low state' which means that the sensor's 4k7 will still (not!) pulldown the pi's 1k8....
- So without doubt: to get it working on a pi requires that you use the i2c-termination of the sensor, (82k up + 4k7 in series), which means: either removal of raspi's resistors or to use other pins...
Software solutions: Write own code, or 'changing the used GPIO's' of the kernel module?
Can anybody advise me?