Judy@4pcba.com
7:30 AM - 7:30 PM
Monday to Saturday

74138 3 to 8 Decoder

74138 3 to 8 Decoder

Overview of 74138 3 to 8 Decoder

The 74138 is a 3 to 8 line decoder IC that converts 3 input bits into 8 output bits. It allows 3 input lines to selectively enable one of the 8 output lines. The truth table for a 74138 is:

Input LinesOutput Lines
A2 A1 A0Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
0 0 00 0 0 0 0 0 0 1
0 0 10 0 0 0 0 0 1 0
0 1 00 0 0 0 0 1 0 0
0 1 10 0 0 0 1 0 0 0
1 0 00 0 0 1 0 0 0 0
1 0 10 0 1 0 0 0 0 0
1 1 00 1 0 0 0 0 0 0
1 1 11 0 0 0 0 0 0 0

The 74138 contains an enable input that is used to enable or disable the outputs. When enable input E is high, the outputs will be according to the truth table. When E is low, all outputs will be low regardless of input lines.

Applications of 74138

Some common applications of the 74138 3 to 8 decoder IC include:

  • Memory address decoding: In memory systems, the 74138 can be used to decode addresses to chip enable individual memory chips.
  • Demultiplexing: The 74138 can be used to route a single data line to one of multiple destinations.
  • Driving indicator LEDs: The outputs can drive LED indicators directly to show a binary pattern.
  • Logic circuit reduction: Using a decoder can reduce the amount of discrete logic gates needed to implement a function.

Circuit Diagram

Here is a simple circuit diagram of the 74138 connected to drive 8 LEDs:

The 3 input bits are connected to the A0, A1, A2 pins which determine which output pin is enabled. The LED connected to the enabled output turns on to display the binary pattern.

Timing Diagrams

The following timing diagram shows the input and output waveforms of a 74138:

When the Enable pin is low, the outputs are disabled. When Enable goes high, the outputs are enabled according to the input code.

Frequently Asked Questions

What is the difference between a decoder and demultiplexer?

A decoder converts encoded inputs into a larger number of outputs, while a demultiplexer routes a single input to one of many outputs. The 74138 can act as both a 3 to 8 decoder and 1 to 8 demultiplexer.

How do I connect a 74138 to a microcontroller?

Connect the 3 input pins to output pins on the microcontroller. The enable pin can be controlled by another microcontroller pin. The 8 outputs can drive LEDs or other devices. Pay attention to voltage levels between the microcontroller and 74138.

Can I cascade two 74138s to make a larger decoder?

Yes, by connecting the outputs of the first 74138 to the inputs of the second, you can create a larger 6 to 64 decoder. The enable pins of both chips need to be connected together.

What is the maximum supply voltage for the 74138?

The 74138 can operate on supply voltages from 4.75V up to 7V. Pay attention that the VI pin voltage does not exceed VCC by more than 0.5V. Higher supply voltages can destroy the IC.

How much current can the 74138 output pins source/sink?

The output pins can sink up to 16mA and source around 0.4mA. They have TTL voltage levels and can drive LEDs directly in many cases.