I need to send commands to 40 devices at once so readback is out of the question. How do I go about doing this?
Use one output and let all 40 listen.. .
Thanks, I considered that and it may be the best way to do it.
I thinks so too. Providing the message ís only one bit using a Mega there is I/O enough but messages will be sent one at the time having a gap of a few microseconds between them.
So what are these devices?
You would not normally be able to do this because of the acknowledge that each device returns. Unless they are chips designed for broadcast messages.
Why do you think that?
There might be other problems (address, wire length),
but reading/writing to 40 sensors can happen in the blink of an eye.
Leo..
I work at a semiconductor design facility. We test our IC's in batches in ovens with the outputs/drivers turning on and off under load. We've been doing it with simple EEPROMs but want to change to Arduinos. So there are 40+ parts on each board all receiving the same commands at once.
Welcome to the forum.
What are the parts ?
If they all have the same I2C address, and you want use them in parallel and send a message to all of them at once, that is possible. You will not be notified if one is no longer connected to the I2C bus.
The will send a ACK together, all 40 of them. That is no problem.
Some I2C devices are very simple, they have a fast hardware interface and accept anything. If the Master would send the data then they all give a ACK at the same time.
For most I2C devices, you can use a strong push-pull driver for the SCL signal, instead of the weak pullup resistor with a open-drain output.
Other I2C devices have a processor inside or turn off the I2C interface when they are busy. There might still be ways to make it work, but you have to check all the timing.
If you want to control them in parallel and read all the individual sensor data, then you have to make it yourself. There will be a single SCL signal, and a software I2C library could be altered to read 8 bits at a time. Then I would use 5 Arduino boards and a extra Arduino board that controls everything. That will be a major project.
Thank you. I can't disclose the devices as they are in design phase. It's a multi channel High side driver. We turn the drivers on and off under max load. I'm not even sure how to write the commands yet as this new to me.
Run a test, put a few in parallel and see what happens, using the Arduino Wire library in a normal way.
You can not damage something, because the I2C bus is open-drain.
The people that designed the chip know if the I2C interface has the same timing for each individual chip.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.