Can OlinuXino work as an I2C slave ?

Started by ilaam, March 31, 2014, 12:01:11 PM

Previous topic - Next topic

ilaam

Hi,
I am a newbie and I was trying to connect an RPi as slave to a master shipset via I2C. Unfortunately RPi does not support the I2C slave mode. I am intending to use OlinuXino instead and I wander if it can work as an I2C slave or not? If so, would it possible to assign many I2C addresses to the OlinuXino? because I need it to emulate different sensors communicating with a master. The master will be asking every single time a sensor (an I2C address) and the OlinuXino should always respond to it as if it was the requested sensor.
Thank you  :)

olimex

no
you better use UART or USB to make this kind of communication

Kean

I think a microcontroller would be needed - maybe an ATmega or PIC could act as an I2C to UART or USB converter.

JohnS

I think it can, if you can bit-bang a GPIO fast enough and simulate I2C.

May not be doable under an OS.

John

ilaam

Thank you all..
The problem is that I'm obliged to use I2C as it is part of the system to simulate.
I'll try to use micro-controller  :)

dave-at-axon

According to the A20 manual, the TWI can be slave or master.

BUT

If you are using an OS then they are going to be enabled as master devices so you may need to disable the TWI that you want to use as a slave and programme it yourself. Not sure how easy this will be and OS as I have not need to do this.

If you only need this for testing, better you get a dev board based on one of the Atmel AVR devices with hardware I2C. Codevision C compiler for these has a wizard to enable the I2C as a slave which makes it easy to get going quickly.

ilaam

Thank you dave-at-axon that's very helpful  :)