LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C sniffer(monitoring)

Hi ,

 

I am wondering if someone can suggest a method to monitor an I2C bus with Labview (just monitoring ,  don't want to be the master or the slave )

Basically i got a system with a master and  few I2C temperature sensors and i would like to read the temperature for each sensor and display on a monitor

 

Hardware Available

NI 8452

cRio 9045

High speed DI cards

 

0 Kudos
Message 1 of 4
(1,369 Views)

You basically need to sample the data and clock lines fast enough and then decode the protocol. I guess implementing this from scratch would be fun, but a cheap logic analyzer will get the task done out of the box. Maybe your oscilloscope (I guess you have one nearby) has a decoder built in?

0 Kudos
Message 2 of 4
(1,330 Views)

If you're looking for an off the shelf oscilloscope based solution, please contact me through private message.

 

In general, as @LLindenbauer suggested, you have to sample the SDA and SCL lines fast enough and decode the edges & levels into protocol packets at the software layer.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 4
(1,325 Views)

Since you have an active i2c bus you really only need to sample the data line when clock goes high.  If you know the clock frequency, trigger a two sample acquisition at 4x clock frequency and use the second reading to get the data value right between the clock rising and falling edges.  If you don't know clock frequency, stick a scope on it and find out.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(1,319 Views)