DIY / 74HC

MC74HC4511N guide: show a digit on a 7-segment display

A seven-segment display has seven separate segments, so showing the digit 5 means switching exactly the right five of them on. Doing that from a four-bit binary number is the whole job of the MC74HC4511N. It decodes a BCD value to the seven segment signals, can latch that value, and drives the display outputs directly.

BCD in, seven segments out

BCD means binary-coded decimal: four bits that hold one decimal digit, 0 to 9. The chip has four BCD inputs, A (pin 7) as the least significant bit through D (pin 6) as the most significant. It has seven outputs named a to g, one per display segment, in the usual layout where a is the top bar, b, c are the right-hand bars, d is the bottom, e, f the left-hand bars and g the middle bar. Without this chip you would need seven logic expressions and a handful of gates — much like the address decoding work done by a 74HC138, the decoder is pre-built inside.

The three control pins

Three control inputs decide what the display shows. LE (latch enable, pin 5) is the memory: a low level lets the BCD inputs pass straight through, and a high level freezes the last value that was present while LE was low, so the display keeps reading correctly even after the input changes. BI (blanking input, pin 4) is active low: a low level forces all seven outputs low and the display goes dark, which is also how you dim a display by pulsing it. LT (lamp test, pin 3) is active low too: a low level drives all seven outputs high so every segment lights, letting you check the display with one wire. Per the data sheet LT overrides BI, and BI overrides the decoded value.

A complete worked example

MC74HC4511 functional flow: a four-bit BCD value passes a transparent latch controlled by LE, is decoded, and drives seven segment outputs a to g.
With LE low the value flows through; LE high holds the last value. SVG.

Here is one complete transaction. Power the chip with VCC on pin 16 and GND on pin 8 — the data sheet allows 2 to 6 V, so a 5 V supply is typical. Leave LT and BI high so neither blanks nor lamp-tests, and hold LE low. Now apply BCD 0101, which is five: A=1, B=0, C=1, D=0. The outputs settle with a, c, d, f, g high and b, e low, which is exactly the digit 5. Take LE high and that pattern stays on the display even if A–D change afterwards. To blank the display for a moment, pull BI low; to clear the latch again, take LE back low with new data applied. At 4.5 V the data sheet guarantees a maximum propagation delay of 120 ns from a BCD input or from LE to an output, so for human-readable digits timing is never the limitation.

Wiring it to a real display

These HC outputs are active high, so they suit a common-cathode LED display: the shared cathode goes to ground and each segment anode is fed from its output pin through its own series resistor. Give each segment its own resistor, never one shared resistor, or the brightness changes with the digit. Keep the current modest: the data sheet guarantees its output voltage levels at up to 4.0 mA per output at 4.5 V and 5.2 mA at 6 V, and limits DC current to 25 mA per pin and 70 mA for the whole package. For a bright large display, use the chip to drive transistors or a dedicated driver instead of the LEDs themselves. A common-anode display needs an inverting driver, because this part cannot sink the segment current through a shared positive rail.

The MC74HC4511N pinout

The figure shows the stocked N-suffix 16-pin plastic DIP from above, with pin 1 at the notch and numbering counter-clockwise. Pin 1 is B and pin 2 is C — note that the BCD bits are not in pin order: A is pin 7 and D is pin 6. Pin 3 is LT, pin 4 is BI, pin 5 is LE, pin 8 is GND and pin 16 is VCC. The segment outputs are a=13, b=12, c=11, d=10, e=9, f=15 and g=14. Tie every unused input to GND or VCC, never leave one floating; a floating CMOS input drifts and draws current.

MC74HC4511N DIP-16 top-view pinout showing BCD inputs A to D, segment outputs a to g, LE, BI, LT, VCC and GND.
Top view of the 16-pin plastic DIP; pin 1 is at the notch. SVG.

How it relates to the CD4511 and MC14511

The 4511 function is older than this part. Motorola notes that the MC74HC4511 is pin-identical to the metal-gate MC14511, but with CMOS output drivers rather than the bipolar drivers of the older part, so do not copy LED current assumptions from a CD4511B or MC14511 design. Its inputs are compatible with CMOS outputs directly and with LSTTL outputs when pull-up resistors are added. Related stocked 4000-series logic such as the MC14002 four-input NOR is a plain gate; this part is a complete decode-and-drive block.

See the MC74HC4511N product.

Sources: Motorola MC74HC4511 technical data in the High-Speed CMOS Logic Data book and the TI CD4511B data sheet for the original function. Motorola PDF · TI PDF.