

The 74LS138 is a high-performance 3-to-8 line decoder/demultiplexer manufactured by Texas Instruments (TI). It takes a 3-bit binary input and activates one of the eight outputs based on the input value. The device features active-low outputs and is widely used in digital circuits for address decoding, data routing, and memory selection.








| Parameter | Value |
|---|---|
| Manufacturer | Texas Instruments (TI) |
| Part Number | 74LS138 |
| Supply Voltage (Vcc) | 4.75V to 5.25V |
| Input Voltage (VI) | 0V to 5.5V |
| High-Level Input Voltage | 2V (minimum) |
| Low-Level Input Voltage | 0.8V (maximum) |
| High-Level Output Current | -0.4mA |
| Low-Level Output Current | 8mA |
| Propagation Delay | 21ns (typical) |
| Power Dissipation | 32mW (typical) |
| Operating Temperature | 0°C to 70°C |
| Package Types | DIP-16, SOIC-16, etc. |
The 74LS138 comes in a 16-pin package. Below is the pinout and description:
| Pin No. | Pin Name | Description |
|---|---|---|
| 1 | G1 | Enable Input (Active High) |
| 2 | G2A | Enable Input (Active Low) |
| 3 | G2B | Enable Input (Active Low) |
| 4 | A | Input A (LSB of the 3-bit binary input) |
| 5 | B | Input B |
| 6 | C | Input C (MSB of the 3-bit binary input) |
| 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 | Supply Voltage |
Below is an example of how to connect the 74LS138 to an Arduino UNO for address decoding:
// Define input pins for the 74LS138
const int pinA = 2; // Connects to A (Pin 4)
const int pinB = 3; // Connects to B (Pin 5)
const int pinC = 4; // Connects to C (Pin 6)
const int enableG1 = 5; // Connects to G1 (Pin 1)
// Binary input values to activate outputs Y0 to Y7
int binaryInputs[8][3] = {
{0, 0, 0}, // Y0
{1, 0, 0}, // Y1
{0, 1, 0}, // Y2
{1, 1, 0}, // Y3
{0, 0, 1}, // Y4
{1, 0, 1}, // Y5
{0, 1, 1}, // Y6
{1, 1, 1} // Y7
};
void setup() {
// Set pins as outputs
pinMode(pinA, OUTPUT);
pinMode(pinB, OUTPUT);
pinMode(pinC, OUTPUT);
pinMode(enableG1, OUTPUT);
// Enable the decoder
digitalWrite(enableG1, HIGH); // G1 is active HIGH
}
void loop() {
for (int i = 0; i < 8; i++) {
// Set binary inputs
digitalWrite(pinA, binaryInputs[i][0]);
digitalWrite(pinB, binaryInputs[i][1]);
digitalWrite(pinC, binaryInputs[i][2]);
// Wait for 1 second before switching to the next output
delay(1000);
}
}
No Output Activation:
Multiple Outputs Activated:
Outputs Not Responding to Inputs:
Q1: Can the 74LS138 be used with a 3.3V microcontroller?
A1: The 74LS138 is designed for a 5V supply. While it may work with 3.3V logic inputs in some cases, it is not guaranteed. Use a level shifter if interfacing with a 3.3V microcontroller.
Q2: What happens if all enable inputs are inactive?
A2: If G1 is LOW or either G2A or G2B is HIGH, all outputs will remain HIGH (inactive).
Q3: Can multiple 74LS138 chips be cascaded?
A3: Yes, multiple 74LS138 chips can be cascaded to decode larger address spaces by using the enable inputs for hierarchical control.
Q4: Are the outputs of the 74LS138 open-collector?
A4: No, the outputs are not open-collector. They are active-low outputs with standard TTL drive capability.