How often do you need to send each slave a seperate RBG value? If most of your transmissions will have the same values for many of the slaves, you might try something along these lines. Use a 4 byte + 3 Byte string. The 4 bytes is used to address the slaves, each with their own individual control bit. The 3 bytes are the RGB values. Any slave whose bit is set in the 4 bytes will use the RGB values, others will ignore the data.
This would allow you to send a much smaller data packet, and the slave processing overhead would still be pretty minimal. Also, you could use the left over 7 bits (from the 4 byte group) to have a bunch of "commands" preprogrammed that the slaves could respond to accordingly.
The obvious downside is that if you need to have individual values for all 75 slaves it is much more data then what you've got.
Also, you might be able to dump the interrupt and just poll the RX pin. The master could hold this low (or high) for a period of time and the slaves can poll it. If it is in the correct state for a loop or two of the main loop, the slave jumps to the recieve and waits for the data. This would rid you of the need for the "junk" data. You would have to tinker with the timing to get all the slaves to respond reliably, but it should work well. With the above technique, you looking at about 7.3ms per data packet. 25 of them is 183ms, so a bit high if you have to update all of the slaves individually.
Just a couple of thoughts,
SteveB
Bookmarks