bakerhillpins
New member
I'd first like to make a suggestion to the moderators:
Might you make a new sub forum for each individual product/board such as the IAH I'm asking about? This would make viewing product information more intuitive and simple to find. It would also alleviate the need to use the search engine to filter to a single product. Which will be problematic because it requires the OP's to use consistent terms or acronyms. You could have a general section and/or individual wiring sections to discuss common application notes and such as well.
Ok, on to my question.
I see that to set/clear the Open-drain and LED outputs I need to use 2 different commands described by this enum:
With each of these commands I send a 2 byte buffer, the first byte is the command # and the 2nd is the channel:
Between the 2 different digital output types there are 8 total outputs (4 of each). It appears from testing that these commands for Set/Clear only take a single channel at a time.
Is this correct?
If so:
Any chance that the commands could be updated to support multiple channels? Or better yet a new write command is created that supports digital output writes in a single byte?
Thanks
Bryan
Might you make a new sub forum for each individual product/board such as the IAH I'm asking about? This would make viewing product information more intuitive and simple to find. It would also alleviate the need to use the search engine to filter to a single product. Which will be problematic because it requires the OP's to use consistent terms or acronyms. You could have a general section and/or individual wiring sections to discuss common application notes and such as well.
Ok, on to my question.
I see that to set/clear the Open-drain and LED outputs I need to use 2 different commands described by this enum:
I2C_MEM_RELAY_SET,
I2C_MEM_RELAY_CLR,
With each of these commands I send a 2 byte buffer, the first byte is the command # and the 2nd is the channel:
intBuff[0] = 0xff & command;
intBuff[1] = ch;
if (write(dev, intBuff, size + 1) != size + 1)
Between the 2 different digital output types there are 8 total outputs (4 of each). It appears from testing that these commands for Set/Clear only take a single channel at a time.
Is this correct?
If so:
- It seems unfortunate to have to perform 8 individual writes to set/clear the complete set of outputs. That equates to 2x as much data transmitted as would be necessary if it could be done as a list of channels after the command.
- We can read the state of the digital outputs in a single byte. Why not support Write the same way Read is performed? It seems that these particular commands might be a legacy implementation detail.
Any chance that the commands could be updated to support multiple channels? Or better yet a new write command is created that supports digital output writes in a single byte?
Thanks
Bryan