For one of the projects I have on my workbench I was using a BCD-to-7-segment decoder in form of a 74LS247N. While I was looking for some more detailed specifics about this circuit I got the impression that – although it’s a quite common and a more or less trivial one – not very much about it could be found on the internet (or maybe I was just not able to find it). So here here we go.
During my journey I stumbled upon a very useful tool that I used to document the circuit: logisim. It is also very helpful when you’re about to design logic circuits. You just need to provide the in- and output by filling the state table and the program generates a gate based representation.
I could not find any information about who or when this circuit was invented but the datasheet from Texas Instruments states that it was first published 1974. So it is very likely that TI was the original inventor. In the meantime you can buy the decoder from several manufacturers. If you study the various datasheets you’ll find a circuit similar to the following:
The input is provided as a binary coded number (BCD = Binary Coded Decimal) to the pins labeled A-D on the left side in the schema above. Pins a-g on the right side provide the decoded number whereas each of the pins corresponds to the segments on the display (usually also labeled a-g). Additionally there are three more pins which provide special features:
- BI/RBO (Blanking Input/Ripple-blanking Output)
BI is active low i.e. when put on low level all segments will be off regardless of the input value. The seconds function of this pin is to provide a low level if inputs A-D and RBI are at low level while LT is at high level.
- RBI (Ripple-blanking Input)
If this pin and inputs A-D are at low level while LT is at high level all segments are off.
- LT (Lamp Test)
If the other two are inactive (i.e. at high level) a low level at this input results in a high level on all outputs. I.e. all segments are on.
The overall logic of this circuit is represented by the following logic symbol:
It should be noted that the ouputs of a 74247 are configured as open-collector which are active low. This could be an issue if you want to drive a 7-segment display directly because it will lead to an inverse display. The solution is then maybe a variant of this decoder: 74248. The circuit is logically identical with the 74247 but provides active high outputs:
The overall logic of the 74248 circuit is represented by the following logic symbol:
As you can see the inputs are identical to the 74247 and the differences are on the output signals.
The design files which can be opened in logisim can be found on GitHub.