Can multiple cards use the same GPIO pin for interrupts
The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi
12/05/2020
Posted by:
PeterB
My question is: Can I parallel up several cards on the same GPIO pin simply through voltage dividers, or is it advisable to use a separate GPIO pin for each card?
12/05/2020
Posted by:
andrew
I have just tested an IO Pi Plus with the interrupt pins connected and set to go high when active. It appears to work correctly with the interrupt trigger showing on my logic analyser so in theory, you should be able to connect all of the interrupt pins together and use a single voltage divider.
Having said that the one issue I can see is if one of the interrupt pins is accidentally set as an open-drain pin instead of active high you could have a direct short to ground from the other interrupt pins, possibly damaging the chips on all of the IO Pi boards.
A better solution would be to use a logic chip to act as a buffer between the interrupt outputs and the GPIO pin. You could use a CD4078 which is an 8-input OR/NOR gate. With an OR gate if any of the inputs goes high the output will go high so you can combine the interrupts from 8 I/O chips into a single output while keeping them isolated from each other.
You will need to run the CD4078B at 5V to make it work with the interrupt pins so you will still need a voltage divider on the output but this should give you a safer way to use all of the interrupts on a single GPIO pin.
13/05/2020
Posted by:
PeterB
13/05/2020
Posted by:
andrew
You shouldn't need to use an extra series resistor on the GPIO pin as the voltage dividers will be limiting the current.
20/05/2020
Posted by:
PeterB
20/05/2020
Posted by:
andrew
Another solution that would need only one component would be to use a 74HC4050 non-inverting HIGH-to-LOW level shifter like the type we use on our Expander Pi and Arduino adapter to convert the 5V SPI signals to 3.3V.
The 74HC4050 can be powered from the 3.3V power rail and the inputs are tolerant of voltages up to 15V so you could connect each input to an interrupt pin on the IO Pi and join all of the output pins together and connect them to a single GPIO pin.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.