Serial/Analog Mux/Demux - 74HC4052
Cost: $0.95 each
Description: If you've ever needed to hook multiple serial devices to one microcontroller, you understand how much of a problem it can be. The 74HC4052 analog mux/demux is one of those parts that, once we discovered it, was a life saver.
'Mux' means that the TX pin (X) can connect to any one of four outputs (X0, X1, X2, X3). So you can connect your micro's TX pin to four different listening devices such as the RX pins on a radio, GPS module (for configuration), data logger, serial LCD.
'Demux' means that the signal can go the other direction as well. So if you have both a radio and a GPS unit trying to talk to your microcontroller, the 74HC4052 allows you to switch between who you listen to. Realize that this does pose a problem. If you've got the A/B pins on the mux configured to listen to the GPS, you may miss incoming serial characters from the radio.
On top of all that, the 74HC4052 is analog as well. This means that you can pass analog values through the IC! So you can connect four analog sensors or signals to the X0/1/2/3 pins, and have them piped into one analog pin. This allows you to connect 8 analog devices using up 2 digital pins and 2 analog pins.
- Large VCC range: 2V to 10V
- Connect one TX source to four RX receivers
- Connect one RX receiver to four TX sources
- Works both with digital and analog signals
- Output drives up to 20mA