74HC238 - 3 to 8 Line Decoder

The M74HC238 is a high speed CMOS 3 to 8 line decoder. There are three binary select inputs (A, B, and C) which determine which one of the eight outputs (Y0-Y7) will go high. This chip has three enable inputs (G1, ~G2A, and ~G2B); when any enable pins are brought low (or high in G1's case), all output pins are pulled low.

This is a great tool if you need to increase the number of outputs on your micrcontroller. For example, it's used in the 3x3x3 LED Cube to help an ATmega168 control the 27 LEDs.

This device comes in a 16-pin DIP package.

  • High speed
  • Wide operating voltage range (2 to 6VDC)
  • Low power dissipation (~4µA)
  • High noise immunity
  • Symmetrical output impedance
  • Balanced propagation delays
  • Inputs equipped with protection circuits against static discharge and transient excess voltage

74HC238 - 3 to 8 Line Decoder Product Help and Resources

Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

2 Soldering

Skill Level: Rookie - The number of pins increases, and you will have to determine polarity of components and some of the components might be a bit trickier or close together. You might need solder wick or flux.
See all skill levels

Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

2 Programming

Skill Level: Rookie - You will need a better fundamental understand of what code is, and how it works. You will be using beginner-level software and development tools like Arduino. You will be dealing directly with code, but numerous examples and libraries are available. Sensors or shields will communicate with serial or TTL.
See all skill levels

Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

3 Electrical Prototyping

Skill Level: Competent - You will be required to reference a datasheet or schematic to know how to use a component. Your knowledge of a datasheet will only require basic features like power requirements, pinouts, or communications type. Also, you may need a power supply that?s greater than 12V or more than 1A worth of current.
See all skill levels


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • tronixstuff / about 14 years ago / 3

    You can use this to control 8 pins with only 3 digital out pins - very useful. For information, please see http://wp.me/pQmjR-E8

  • Member #404296 / about 11 years ago / 1

    Here's an example of using a similar decoder: http://matthewrupert.net/2013/03/22/demultiplexer-with-arduino/#more-1070

  • Dr. DFTBA / about 12 years ago / 1

    So let me get this straight. I can't turn on 2 inputs at once? If htis is true, is the chip fast enough to switch pins to different segments on a 7-segment for POV to look like multiple segments are on?

    • TessN / about 11 years ago * / 1

      Correct, this will not drive a 7-segment display. If you only need to display 0-9, you can use something like a 4511 decoder - it uses 4 pins to specify the number 0-9 and then illuminates the appropriate segments.

      For the general case of controlling all the segments, you want a shift register.

  • KDodman / about 12 years ago / 1

    Forgive my ignorance, buy why would I use this over a shift register?

    • TessN / about 11 years ago / 4

      In user interface terms, a shift register is like check boxes - you can turn each one on and off individually. A decoder like this is like radio buttons - turning one on turns the others off. You can write code for a checkbox that turns the rest off when you turn one on, and you can always use a shift register in place of this decoder. But the decoder might make your logic simpler if it's all you need.

  • baum / about 12 years ago / 1

    I designed a circuit to run 8 LEDs off 3 (tri-stated) micro pins. At 3.3V, all it requires, externally, is an NPN and a PNP. For voltages greater than ~4V, you need a bunch of Zeners. But if you need to control 8 LEDs, etc., are using ~3V, and have limited pin count, this may be great for you...

  • you SFE guys could change the link to the 3x3x3 cube to the newer one...

  • FelixR / about 13 years ago / 1

    I would need this but in inverted logic to control many SPI devices...

Customer Reviews

No reviews yet.