CD74HC4067 analog multiplexer
Sixteen channels to one pin through analog switches: four address lines pick which one.
- 24 pins
- In 1 project
- In 1 lesson

The CD74HC4067 analog multiplexer in brief
What it is, and where it sits on the bench.
The CD74HC4067 is a 16 channel analog multiplexer: sixteen analog switches with one common pin, where four address lines pick which channel reaches COM. The pins are I0 to I15, the sixteen channels, COM, the common pin, called SIG on some boards, S0 to S3, the channel address with S0 the least significant bit, EN, enable, active low, which opens every switch when high, and VCC and GND, 2 to 6 V. Each switch passes current in either direction. One analog pin reads sixteen sensors, or one pin drives sixteen outputs in turn. While it runs, the marker beside the channel joined to COM lights. It is the bigger cousin of the 74HC4051, which has eight channels.
- Family
- Logic
- Pins
- 24
24 pins
Named as the editor names them, so a wire lands where you expect it.
SIG on some boards).How to read sixteen sensors on one pin with a CD74HC4067
COM goes to A0. The four address pins S0 to S3 go to Uno pins 2 to 5. EN is tied to GND so the switches are on, VCC goes to 5 V and GND to the Uno’s ground. The three knobs’ wipers go to channels I0, I5 and I15.
The sketch writes the channel number onto the four address pins, bit 0 to S0, waits 50 microseconds for the switch to settle, and reads A0. It reads channels 0, 5 and 15 and prints them. Turn each knob and its channel follows. Sixteen channels use four address pins, where the 74HC4051’s eight need three.
const uint8_t ADDRESS[4] = {2, 3, 4, 5}; // S0 to S3
const uint8_t CHANNELS[3] = {0, 5, 15};
int readChannel(uint8_t channel) {
for (uint8_t bit = 0; bit < 4; bit++) {
digitalWrite(ADDRESS[bit], (channel >> bit) & 1 ? HIGH : LOW);
}
delayMicroseconds(50); // let the switch settle
return analogRead(A0); // COM on A0
}
void setup() {
Serial.begin(9600);
for (uint8_t bit = 0; bit < 4; bit++) pinMode(ADDRESS[bit], OUTPUT);
}
void loop() {
for (uint8_t i = 0; i < 3; i++) {
Serial.print("ch");
Serial.print(CHANNELS[i]);
Serial.print(" ");
Serial.println(readChannel(CHANNELS[i]));
}
delay(300);
}Common CD74HC4067 analog multiplexer errors and fixes
Questions and answers
How many channels does the CD74HC4067 have?
Sixteen, I0 to I15, picked by the four address pins S0 to S3.
What is the common pin called?
COM, and SIG on some boards.
What is the difference from the 74HC4051?
The 74HC4051 has eight channels and three address pins. The CD74HC4067 has sixteen and four.
What is true about the CD74HC4067 analog multiplexer, here
In its help article’s own words: what the simulation gets right, and where it stops.
Modeled
From the TI datasheet:
It is a switch, not a buffer. The chosen channel is joined to COM through the
on-resistance, both ways, so the signal is divided by whatever loads it, as on the
bench.
The on-resistance: 70 ohm typical from 4.5 V up, 100 ohm from 3 V and 160 ohm below.
Every other channel is open, and EN high opens them all. An address line that
is not a clean logic level opens every switch too.
Not modeled
The switching time, break-before-make, charge injection, leakage, the on-resistance's change with the signal voltage, and signals past the supply rails, which a real one clamps.
From CD74HC4067 16-channel multiplexer, in full.
See the CD74HC4067 analog multiplexer in a project
One built-in project uses it. It opens in the editor, already wired.
Where it turns up in a lesson
One lesson places it in its own circuit.
The boards it is shown on
This board has a built-in project with the CD74HC4067 analog multiplexer in it.
Arduino libraries for the CD74HC4067 analog multiplexer
Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the CD74HC4067 analog multiplexer
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.