What is the easiest way to talk to multiple slave devices using and Arduino platform (or TI Energia platform). the issue I am thinking about is having to keep passing the new CS pin the SPI begin function. Any help is much appreciated.
Thanks
Kas
What is the easiest way to talk to multiple slave devices using and Arduino platform (or TI Energia platform). the issue I am thinking about is having to keep passing the new CS pin the SPI begin function. Any help is much appreciated.
Thanks
Kas
Kas, you can take this for what it's worth. You see you want a broadcast mode, but you already limited yourself to SPI.
This is like; Cart before Horse. You should have asked yourself; What do I need?
And then no matter what Communications Hardware or Firmware you have, you have to implement a protocol.
SPI, I2C have rather short distances it can go, even though I2C has reserved address. they are both on the weak side.
for CHEAP a few bucks each on ebay i picked up some I2C to CAN bus transceivers. This has broadcast and does about 40 feet on twisted pair.
Dehumidifier messages:
1 The Temp is xxx
2 The Humidify is xxx
3 The Tank is Full
4 The Tank is not in place
System messages to the Dehumidifier
5 Turn ON
6 Turn OFF
This is the protocol: bit 0 to bit n Numbers are in HEX
FF fist two bytes - Start Byte
01 second two bytes Device # this is the Dehumidifier.
xx third two bytes Message Code
xx forth two bytes the Message or Payload
00 fifth two bytes Stop Byte
Cris
PS and to anybody that takes a known standard and wants to hack it by adding another "control wire".... I had a real problem I used to make the board myself
NOW I JUST BUY THEM...LOL
Kas, you can take this for what it's worth. You see you want a broadcast mode, but you already limited yourself to SPI.
This is like; Cart before Horse. You should have asked yourself; What do I need?
And then no matter what Communications Hardware or Firmware you have, you have to implement a protocol.
SPI, I2C have rather short distances it can go, even though I2C has reserved address. they are both on the weak side.
for CHEAP a few bucks each on ebay i picked up some I2C to CAN bus transceivers. This has broadcast and does about 40 feet on twisted pair.
Dehumidifier messages:
1 The Temp is xxx
2 The Humidify is xxx
3 The Tank is Full
4 The Tank is not in place
System messages to the Dehumidifier
5 Turn ON
6 Turn OFF
This is the protocol: bit 0 to bit n Numbers are in HEX
FF fist two bytes - Start Byte
01 second two bytes Device # this is the Dehumidifier.
xx third two bytes Message Code
xx forth two bytes the Message or Payload
00 fifth two bytes Stop Byte
Cris
PS and to anybody that takes a known standard and wants to hack it by adding another "control wire".... I had a real problem I used to make the board myself
NOW I JUST BUY THEM...LOL