User avatar
Deepak J
Posts: 11
Joined: Wed Apr 16, 2014 7:04 am

I2C slave triggering

Mon Sep 08, 2014 3:16 pm

Hi ,
Is there some way in which a slave device (an arduino in my case) send a data without a master(raspberry pi) requesting it..? Like what we do via a serial communication...? Something like a slave triggering the communication..

Both general answers and arduino specific answers would be of great help. . :D

-Thanks in advance :)
Quit, don't quit? Noodles, don't noodles? You are too concerned about what was and what will be. There is a saying: yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the "present."
- Master Oogway

User avatar
joan
Posts: 14960
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: I2C slave triggering

Mon Sep 08, 2014 3:49 pm

I don't think there's anything in the I2C standard which provides for a slave triggering a transaction. It sounds a bit like an SMBus Alert.

Why not implement your own? Send a signal on a spare Pi gpio to tell the Pi you want servicing.

User avatar
Deepak J
Posts: 11
Joined: Wed Apr 16, 2014 7:04 am

Re: I2C slave triggering

Mon Sep 08, 2014 4:05 pm

joan wrote:Send a signal on a spare Pi gpio to tell the Pi you want servicing.
The problem is, I don't have a spare GPIO on the pi..all the ports (even the spare headers has been used)... :-(
Quit, don't quit? Noodles, don't noodles? You are too concerned about what was and what will be. There is a saying: yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the "present."
- Master Oogway

User avatar
joan
Posts: 14960
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: I2C slave triggering

Mon Sep 08, 2014 4:53 pm

Deepak J wrote:
joan wrote:Send a signal on a spare Pi gpio to tell the Pi you want servicing.
The problem is, I don't have a spare GPIO on the pi..all the ports (even the spare headers has been used)... :-(
Then you'll need to get the Pi to poll the Arduino for I2C messages at regular intervals.

User avatar
Deepak J
Posts: 11
Joined: Wed Apr 16, 2014 7:04 am

Re: I2C slave triggering

Wed Sep 10, 2014 8:42 am

ohkk..den...thanx for the reply....my arduino is failry busy always...but still i'll try doing that ... :D
Quit, don't quit? Noodles, don't noodles? You are too concerned about what was and what will be. There is a saying: yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the "present."
- Master Oogway

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: I2C slave triggering

Wed Sep 10, 2014 9:15 am

Deepak J wrote:
joan wrote:Send a signal on a spare Pi gpio to tell the Pi you want servicing.
The problem is, I don't have a spare GPIO on the pi..all the ports (even the spare headers has been used)... :-(
I think it may be time to rethink what you are doing. If you have multiple I2C devices and are monitoring the INT from each, then I would at least consider configuring each device to use Open Drain and tie all the interrupts together and use a single GPIO pin..
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Return to “Interfacing (DSI, CSI, I2C, etc.)”