I'm designing a SPI based communiations circuit between Raspberry Pi4+B as a master and (n x 8) GPIO expander modules, as slaves. Concretely we have selected an MCP23S17 GPIO expander: Datasheet
By the moment I will try if the system is able to write 0 or 1 to the GPIO = outputs. After this, I will be testing the reading pin values from GPIO = inputs.
I would like to know if someone has worked with this, and I will also ask for some things if for example:
- I access any of the expansor modules and I write some output pins (1 or 0)
After write operation we access another expansor modules for carry out any operation like the previous one
- What happens with the first output pin value of the first operation? Does the expansor device keep the previous pins state even if the expansor module is not acceded (unselected) yet?
I have read datasheet and application notes. I don't find there any information that makes me think that the state is "erased" after being unselected.
- I have another question about something read at datasheet. "each pin can be configured emulating open drain configuration" --> what does it mean? and for what is useful this option?
By the information that I've seen it's similar to use pull up/down, but getting more current. It can be also used for passing one level signal to another level signal, between CIs. But when is it better than using only pull up/down resistors? When can I get advantage of using a pin with this configuration?
Any help will be appreciated.