11-21-2011 01:56 PM
Hi,
I've been recently using the NI USB8451 to communicate with a chip using the I2C protocol.
One of the things the chip does is continuously output in digital (subject to the ADC conversion integration steps, and so on), and this is sent over everytime I request a read in I2C.
That all works fine and all, but I've been thinking of communicating with as many as 32 or even up to 64 of them at once. This is where it gets a little messy - I need to be able to read from all of them at once. I cannot sequentially poll each one of them, since I need to ensure that the data is polled simultaneously, and the data is liable to have changed in the time that I've polled chip 1 to chip 32, say.
I'm not certain that the USB8451 is actually the best thing for this, considering what I'm suggesting is akin to a multiple bus I2C system. I'm willing to consider any alternatives, or if there are any chip-based solutions I'd be happy to look into it as well.
Additionally, I guess I should also mention that I can also use a 4-wire SPI interface. I figure however, it's much the same, since I'd require a separate MISO line for every chip. Same goes with the I2C, where I'd require a separate SDA line for every chip I guess.
Any ideas/suggestions?
Thanks.
11-22-2011 12:19 PM
Gabriel,
Unfortunately, by nature the I2C communication protocol is serial. In addition, full communication cycles (start, adress, data echange, stop) must be performed when accessing individual slaves. So receiving multiple data cannot be simultaneous. You could try polling at such a rate that the data is "basically" simultaeneous but due to the limitation of the protocol, parallel sampling from multiple slaves is not possible, regardless of the devices. The same holds true for SPI communication. You have to choose one slave at a time to receive data, and then move on to the next slave. Trying to receive data from mulitple I2C devices will cause data collision.