TechTorch

Location:HOME > Technology > content

Technology

Displaying a 6-Bit Binary Input on Two Seven-Segment Displays in Decimal

February 25, 2025Technology4255
Introduction This article provides a comprehensive guide on how to dis

Introduction

This article provides a comprehensive guide on how to display a 6-bit binary input on two seven-segment displays in decimal format. The focus is on using integrated circuits (ICs) from the 74LS series, specifically the 74LS47 and 74LS48 BCD-to-7-segment decoders. However, alternative methods such as binary-to-BCD conversion algorithms and utilizing table lookup PROMs are also discussed.

Using BCD-to-7S Decoders for Direct Conversion

Direct Conversion Method: A straightforward approach is to use BCD-to-7S decoders like the 74LS47 or 74LS48. However, since these decoders expect 4-bit BCD inputs, direct conversion of a 6-bit binary number to decimal requires an intermediate step. One method is to convert the 6-bit binary to BCD using an algorithm and then feed that BCD into the decoders.

Algorithm for Converting 6-Bit Binary to BCD

The following algorithm can be used to convert a 6-bit binary number to BCD:

Fill the 6-bit binary number into a shift register, bits 5 to 0. If bits 3 to 5 represent a binary 4, add 3 to them. Shift one bit to the left. Repeat the add and shift process two more times. The resulting BCD digits can be used to drive two 7-segment displays, with the first BCD digit on the lower six bits and the second on the highest three bits (after shifting).

However, this approach is not ideal as it involves an active algorithm and is prone to complexity.

Using 74184 Binary-to-BCD Converter and 7447/7448 Decoders

An alternative is to use a 74184 binary-to-BCD converter along with two 7447/7448 decoders. The 7447 and 7448 are BCD-to-7S encoders that work well for common cathode (CC) and common anode (CA) displays, respectively.

Note: The 74184 is no longer manufactured. For practical use, you may consider using a programmable logic device like an ATF22V10C or encoding the binary to BCD using EPROMs.

Using Table Lookup PROMs for Direct Display

A more straightforward approach is to use a PROM that can store the necessary 7-segment display patterns for both digits. Here’s how:

Choose a PROM with at least 128 bytes and 8-bit output to store the 7-segment patterns for digits 0-9. Divide the input 6-bit binary into two banks, each 6 bits in size, to store in the first 64 bytes (for the lower digit) and the second 64 bytes (for the upper digit). Use the 7-segment display drivers (7447 or 7448) to display the patterns stored in the PROM. Drive the second address input of the PROM to match the digit you want to display, using persistence of vision to make both digits appear as if they are lit simultaneously.

This method is reliable and easy to implement, but for older hardware, you may need to use PROMs like the 74S271 or any 8-bit PROM from the era.

Conclusion

Displaying a 6-bit binary input on two seven-segment displays in decimal requires either a sophisticated algorithm or the use of integrated circuits and PROMs. The BCD-to-7S decoders offer a direct but complex solution, while PROMs provide a simpler and more practical alternative. Regardless of the method chosen, the goal is to accurately and efficiently display the decimal equivalent of the binary input.