

The 74HC139N is a high-speed CMOS dual 2-to-4 line decoder/demultiplexer. It features two independent decoders, each with two binary inputs and four mutually exclusive outputs. The device is designed for use in high-performance digital systems and is compatible with TTL logic levels. The 74HC139N is commonly used in applications requiring address decoding, data routing, or device selection.








The 74HC139N is a 16-pin IC with the following pinout:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | G1 | Enable input for decoder 1 (active LOW) |
| 2 | A1 | Input A for decoder 1 |
| 3 | B1 | Input B for decoder 1 |
| 4 | Y0_1 | Output 0 for decoder 1 |
| 5 | Y1_1 | Output 1 for decoder 1 |
| 6 | Y2_1 | Output 2 for decoder 1 |
| 7 | Y3_1 | Output 3 for decoder 1 |
| 8 | GND | Ground |
| 9 | Y3_2 | Output 3 for decoder 2 |
| 10 | Y2_2 | Output 2 for decoder 2 |
| 11 | Y1_2 | Output 1 for decoder 2 |
| 12 | Y0_2 | Output 0 for decoder 2 |
| 13 | B2 | Input B for decoder 2 |
| 14 | A2 | Input A for decoder 2 |
| 15 | G2 | Enable input for decoder 2 (active LOW) |
| 16 | Vcc | Positive supply voltage |
The following example demonstrates how to use the 74HC139N with an Arduino UNO to control a set of LEDs.
// Define pins for the 74HC139N
const int enablePin = 7; // Enable input for decoder 1
const int inputA = 8; // Input A for decoder 1
const int inputB = 9; // Input B for decoder 1
void setup() {
// Set pin modes
pinMode(enablePin, OUTPUT);
pinMode(inputA, OUTPUT);
pinMode(inputB, OUTPUT);
// Enable the decoder (active LOW)
digitalWrite(enablePin, LOW);
}
void loop() {
// Cycle through all outputs (Y0 to Y3)
for (int i = 0; i < 4; i++) {
digitalWrite(inputA, i & 0x01); // Set A based on LSB of i
digitalWrite(inputB, (i >> 1) & 0x01); // Set B based on MSB of i
delay(1000); // Wait 1 second before switching
}
}
No Output Activation:
Multiple Outputs Active:
Overheating:
Q: Can I use the 74HC139N with a 3.3V system?
A: Yes, the 74HC139N is compatible with supply voltages as low as 2V, making it suitable for 3.3V systems.
Q: What happens if both decoders are enabled simultaneously?
A: Both decoders will function independently, but ensure that their outputs are not connected to the same load to avoid conflicts.
Q: Are the outputs active HIGH or active LOW?
A: The outputs are active LOW, meaning the selected output will go LOW while the others remain HIGH.