The 74HCT138 is a 3-to-8 line decoder/demultiplexer that accepts three binary address inputs to enable one of eight mutually exclusive, active-LOW outputs. It typically runs from approximately 4.5–5.5 V, presents TTL-equivalent input thresholds with HCT-level compatibility, and can source/sink enough current to drive multiple TTL-type loads or indicator LEDs with resistors.
These parameters matter for address decoding, memory chip selection and clean signal routing in embedded systems: supply range dictates level compatibility, active-LOW outputs determine pull resistor strategy, and output drive and timing constrain fanout and bus timing. This article condenses essential pinout and datasheet specs for quick design decisions and fast prototype-to-PCB transitions.
The device decodes three binary inputs (A0, A1, A2) into one asserted output among eight (Y0–Y7); outputs are active-LOW and mutually exclusive. Three enable pins control operation: a level-high enable and two level-low enables combine to gate decoding. Use the decoder for address decoding, demultiplexing, or implementing simple transistor-transistor logic equivalents when discrete gating is simpler than firmware changes.
When to prefer this decoder: five-volt logic systems needing TTL-equivalent input thresholds; designs requiring deterministic hardware decoding to reduce MCU pin use; low-cost board-level demuxing. Tradeoffs versus MCU decoding include fixed hardware timing, no software flexibility, and limited voltage range compared with newer CMOS options.
Common packages include 16-pin DIP and 16-pin SOIC with conventional pin numbering: A0/A1/A2 grouped, enables labeled G1, G2A, G2B, outputs Y0–Y7, plus VCC and GND. Caption suggestion for any figure: “74HCT138 pinout — DIP and SOIC.” Follow standard datasheet pin-numbering conventions when translating a diagram to your schematic footprint.
Quick guidance: A0–A2 inputs (direction: input) parity selects outputs; Y0–Y7 (direction: output) active-LOW; G1 (input, active-HIGH), G2A and G2B (inputs, active-LOW) control enables. Floating inputs should use 10 kΩ pull resistors to ensure defined logic; tie unused outputs to pull-ups only if required by downstream logic. Enables: assert G1 high and G2A/G2B low to enable decoding.
| Pin | Type | Polarity | Notes |
|---|---|---|---|
| A0/A1/A2 | Input | Positive | Use 10 kΩ pull if floating |
| G1 / G2A / G2B | Input | G1 high, G2A/G2B low to enable | Gate selects outputs |
| Y0–Y7 | Output | Active-LOW | Can sink TTL-equivalent loads |
| VCC / GND | Power | — | Decouple close to VCC pin |
Recommended VCC range is approximately 4.5–5.5 V, with commercial ambient temperature ranges typical for standard logic families. VIH and VIL follow HCT thresholds appropriate for TTL-level drivers; quiescent ICC is small but varies by package and input levels—budget a few microamps to a few milliamps when inputs toggle. Always reference the manufacturer datasheet for exact VIH/VIL and ICC figures for power budgeting.
Respect absolute maximum VCC (slightly above recommended VCC) and avoid driving inputs beyond VCC or below GND to prevent clamp currents. Per-pin output current and total package limits set safe fanout—do not exceed specified IO limits; provide thermal derating if multiple outputs source/sink near limits. ESD handling is required during assembly and testing; design traces and fusing with realistic current margins.
Typical propagation delays from input change to output are on the order of tens of nanoseconds; rise and fall times depend on load and board capacitance. Read switching tables in the datasheet for td(PHL/PLH) and fanout graphs; include a small timing diagram in documentation showing address transition to output change and annotate typical and maximum delays for worst-case timing analysis.
Output drive is often specified in terms of TTL-equivalent loads; translate that to modern input currents when estimating fanout. Driving LEDs requires series resistors sized by VCC and desired current; driving many inputs increases rise/fall times—use series resistors, keep traces short and add decoupling to preserve edge integrity. Plan PCB routing to minimize capacitive loading on outputs.
Wire A0–A2 to the address source, tie G1 to logic HIGH and G2A/G2B to LOW to enable normal operation; use 10 kΩ pull-ups or pull-downs as needed. For LED indicators, add a 330–1 kΩ series resistor per output depending on desired brightness and VCC. To gate decoding, drive G1/G2 pins from control logic or MCU pins as required.
Place a 0.1 μF bypass capacitor close to VCC and GND pins; keep VCC/GND traces short and use ground vias for SMD. Cluster address lines and avoid long parallel runs to outputs that drive indicators or long cables. For DIP assemblies, consider thermal relief for through-hole pads; for SMD, ensure pad solderability and solid ground return paths.
Symptoms and fixes: unpredictable outputs often come from floating inputs—add pull resistors; outputs stuck active—verify enable polarities and input logic levels; excessive ringing—add decoupling, series resistors, or slow edges. Measure VCC, address inputs and outputs with an oscilloscope at suspected faults and confirm enable pin states and supply integrity.
Consider HC or CMOS variants for wider voltage ranges or lower power; choose devices with faster propagation if timing-critical. Checklist: confirm VCC compatibility, fanout and IO current, propagation delay, package and footprint, decoupling strategy, and finalize footprint pin numbering with the datasheet before PCB release. Always validate final numbers from the manufacturer datasheet.
The 74HCT138 is a compact, hardware-level 3-to-8 active-LOW decoder suited to 5 V logic systems where deterministic decoding and minimal MCU use are desired. Designers should memorize the pinout, respect enable polarities, verify VCC and timing from the manufacturer datasheet, and apply standard wiring and PCB decoupling practices. Verifying fanout, thermal limits and propagation delay early prevents late-stage redesigns.
Assert G1 high and drive G2A and G2B low to enable decoding. If you need the decoder disabled, force any of those conditions inactive (G1 low or either G2 high). Use MCU pins or hard-tied logic levels with proper pull resistors to avoid floating enables.
Use a 5 V supply within the recommended 4.5–5.5 V range and place a 0.1 μF ceramic bypass capacitor as close as possible to VCC and GND pins. For noisy systems, add bulk decoupling and ensure solid ground returns to minimize switching perturbations.
Always consult the manufacturer datasheet for exact propagation delays, rise/fall times, ICC, per-pin and total package output current limits, and absolute maximum ratings. Validate worst-case timing on the bench with intended loads and include margin in the PCB design checklist.




