LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i2c with multiple slaves and one master

Hi.

With a 845x module (as master), is it possible to communicate with multiple slaves, each using the same address, and using for instance relays to switch the i2c lines from one slave to the other?

I need to test multiple slave devices, ideally with a single master.

The test itself can take one minute (the i2c sensors are heating during this time), and to save time, I'd switch from one device to the other, achieving some kind of parallel testing.

 

Thanks in advance!

 

0 Kudos
Message 1 of 7
(5,022 Views)

Sending a message to two devices that have the same address is not advised. If the devices do not send any replies, you could potentially set them up to both receive the message. If they are needing to reply to the master, the line would get clogged, since only one message can be on the bus at a time.

Kelli Kravetz
Product Marketing Manager
LabVIEW, LabVIEW NXG, LabWindows/CVI, Measurement Studio
National Instruments
0 Kudos
Message 2 of 7
(4,987 Views)

Thanks Kelli.

Maybe it was not clear in my original post but only one device would be connected to the master at a time.

The devices would be switched in and out with a relay matrix or something alike.

All the slaves are using the same address.

We are producing the units and want to test them something like ten at a time.

The idea is to use a relay matrix and switch from one to the other.

Possible?

 

Thanks again!

François

0 Kudos
Message 3 of 7
(4,957 Views)
If you switch all lines, you would not have multiple slaves and of course you would not be doing anything in parallel. I don't understand what is the problem.
0 Kudos
Message 4 of 7
(4,942 Views)

Ok, so I'll get a slave at a time, is it phrased correctly now? 🙂

Is it possible to operate that way?

0 Kudos
Message 5 of 7
(4,933 Views)
That is the way it is designed to operate. Why would you think differently?
0 Kudos
Message 6 of 7
(4,926 Views)

He said yes.  How many ways would you like to hear it?

 

If they're connected at the same time, that makes for one strange test as they can't reply.  If you're using a switch to switch between them in a way that only one is hooked up at a time, then it's no different than any other I2C setup.  Why would you even bother to ask if a system with one slave and one master would be expected to work?

0 Kudos
Message 7 of 7
(4,922 Views)