Multiplexers and Shift Registers
Multiplexers and Shift Registers are integrated circuits whose functions are to give you more pins when using an Arduino. Multiplexers can do input and outputs at the same time while a Shift Register would need to be set up to either do input or output, it cannot do them at the same time. This is because of how they work. Multiplexers cycle through each output/input very quickly, they do not read/write all outputs/inputs at the same time however it does it so fast that it appears to us like it is. This is useful for reading multiple digital/analog inputs like buttons or Potentiometers at the same time and maybe turning LED’s on or off however with more and more LED’s a dimming effect happens due to the cycling. Multiplexers can read analog inputs while Shift Registers cannot. Shift Registers work by receiving the signals for all outputs or inputs at once and then applying them. This means you can only do digital outputs. In the case of many LED’s being turned on or off you wont have the same dimming effect as with the Multiplexer because once the Shift Register has the signal it applies it to all outputs or inputs.
We talked about integrated circuits, how to read datasheets and then wired up a multiplexer using its specific datasheet.
We used the Multiplexer to then control our seven segment display from earlier. The seven input wires needed for the display are all connected to the multiplexer. For the multiplexer we have five wires connected to five pins on the arduino which is less than the seven wires needed for the seven segment display. There are also two buttons and an LED connected to the multiplexer which would have meant we needed ten pins on the arduino.
We compared Multiplexers to Shift Registers and then wired up a shift register to control 8 LED’s. As shown below the Shift register only needs three arduino pins to function which makes it very efficient to control a bunch of LED’s with.