I just looked into the creating bitbanged I2C hosts and it says it was designed and tested for Raspberry Pi so it need some changes and this does not guarantee it will work properly on Intel Edison. I suggest you to try building the Intel Edison image using the Yocto image sources and make the changes mentioned in the Kernel by the guide. You might find this document helpful as well as the BSP User Guide. I hope this suggestion helps.
Thanks JPMontero_Intel for looking at the guide and providing these useful links. As far as I could see the only kernel requirement from i2c-gpio-param (the bitbanging module) is that CONFIG_I2c_GPIO is enabled, and that is the case in the default Yocto that came with Edison.
I was encouraged by the fact that the insmod command indeed created a I2C bus, which it didn’t when I had a GPIO exported on pin 14 before. So it is not completely non-functional, it just doesn’t work yet. :-)
For now I’m considering these issues:
- i2c-gpio-param may indeed require changes itself. Maybe the required changes will become obvious from reading the Yocto image sources.
- Perhaps a different variation of udelay / timeout / sda_od / scl_od / scl_oo parameters is needed. I tried a few but not yet systematically.
- When configuring the kernel for custom compilation, maybe different port pairs can be marked as I2C as well, so that no bitbanging is needed? Not sure what is the difference between I2C and non-I2C GPIO ports in terms of hardware.
- Related, maybe the I2C ports predefined by Intel are the only ones capable of doing I2C, so bitbanging won’t work at all (without additional hardware)?
Thanks JPMontero_Intel, I might try that sometime. I haven’t continued with the bitbanging since my last post, and switched to BLE communication with a separate microcontroller (which suits my current project better).
Hey s89. Don't suppose you have any further information on this? I'm looking at connecting the LiPo Fuel Gauge's I2C interface with the GPIO Block if possible.
geotheory, no news, I stopped trying. According to Wikipedia the I2C algorithm (in terms of well-timed 1s and 0s) seems pretty simple so you might want to try bit-banging without the kernel module. There may be libraries made for this purpose (perhaps written for Raspberry Pi) or you might want to implement it yourself. For my next project I’d reconsider buying the Sparkfun block first since it probably saves a lot of time.
Yes I've just got the I2C board for this. Cheers.