Saturday, October 4, 2014
GPIO pins Circuit
This diagram shows how this needs to be connected. GPIO pins 1, 2, and 3 are set to output mode and used as address lines to select which input to read. GPIO pin 0 is set to input mode and connected to the output of the multiplexer.
(Note: I always refer to WiringPi pin numbers, not the standard BCM numbering.)
The result is that the interface can still have 8 inputs, but only use 4 GPIO pins to do it.
I will probably do the same thing (in reverse) to allow two GPIO pins to provide four select lines for the SPI bus. It may be a while until I do that since the SPI bus is for future expansion. I don't have any devices for it yet, just ideas.
Labels:
circuit
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment