

The 74138 Decoder, manufactured by Semiconductor, is a high-performance integrated circuit designed to convert binary information from its input lines into a maximum of (2^n) unique output lines. This IC is commonly used in digital systems for tasks such as address decoding, data routing, and enabling specific outputs based on binary input combinations.








The 74138 Decoder is a 3-to-8 line decoder/demultiplexer with active-low outputs. Below are its key technical details:
The 74138 Decoder comes in a 16-pin Dual In-line Package (DIP). Below is the pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | G2A | Enable Input (Active High) |
| 2 | G2B | Enable Input (Active High) |
| 3 | G1 | Enable Input (Active Low) |
| 4 | A | Input A (Least Significant Bit) |
| 5 | B | Input B |
| 6 | C | Input C (Most Significant Bit) |
| 7 | Y7 | Output 7 (Active Low) |
| 8 | GND | Ground |
| 9 | Y6 | Output 6 (Active Low) |
| 10 | Y5 | Output 5 (Active Low) |
| 11 | Y4 | Output 4 (Active Low) |
| 12 | Y3 | Output 3 (Active Low) |
| 13 | Y2 | Output 2 (Active Low) |
| 14 | Y1 | Output 1 (Active Low) |
| 15 | Y0 | Output 0 (Active Low) |
| 16 | Vcc | Power Supply (5V) |
Below is an example of connecting the 74138 Decoder to an Arduino UNO for address decoding:
// Arduino UNO example for controlling the 74138 Decoder
// Connect the 74138 pins as follows:
// A -> Pin 4, B -> Pin 5, C -> Pin 6 on the 74138
// G1 -> GND, G2A -> 5V, G2B -> 5V
// Y0 to Y7 connected to LEDs for demonstration
// Define Arduino pins connected to the 74138 inputs
const int pinA = 2; // Arduino pin connected to A
const int pinB = 3; // Arduino pin connected to B
const int pinC = 4; // Arduino pin connected to C
void setup() {
// Set pins as outputs
pinMode(pinA, OUTPUT);
pinMode(pinB, OUTPUT);
pinMode(pinC, OUTPUT);
}
void loop() {
// Cycle through all 8 output combinations
for (int i = 0; i < 8; i++) {
digitalWrite(pinA, (i & 0x01)); // Set A to LSB of i
digitalWrite(pinB, (i & 0x02) >> 1); // Set B to second bit of i
digitalWrite(pinC, (i & 0x04) >> 2); // Set C to MSB of i
delay(500); // Wait for 500ms before changing output
}
}
No Output Activation:
Incorrect Output Activation:
All Outputs Remain HIGH:
Q1: Can the 74138 Decoder be used with a 3.3V system?
A1: No, the 74138 is designed for a 5V system. Using it with 3.3V may result in unreliable operation.
Q2: What happens if multiple enable inputs are not configured correctly?
A2: If G1 is HIGH or G2A/G2B are LOW, all outputs will remain inactive (HIGH).
Q3: Can the outputs drive LEDs directly?
A3: Yes, but ensure that the current through each output does not exceed 16mA. Use current-limiting resistors with LEDs.
This concludes the documentation for the 74138 Decoder.