Wednesday, 1 May 2019

7segmentdisplay - 7 segment binary to hex


I'm trying to display a 4-bit binary number on a 7 segment LED as a hexadecimal number (0-F). I have an assortment of 7400 series ICs including the 7447. But that one only works for BCD (0-9). The 7400 series doesn't seem to have a hex to 7-segment decoder and I don't have one on hand.


So I figure I'd have to build my own. The datasheet for a 7447 comes with the internal circuitry but I couldn't find a similar circuit for hex to 7-segment. I did K-diagrams for each LED segment by hand but the terms are rather large, much larger than for BCD.


Does anyone have a finished circuit for this that I can check my work against?


Does anyone have an optimized circuit for this that takes advantage of common subterms? There aren't many duplicate terms (like A0 & ~A1 & A2) but maybe using (A0 & A2) & ~A1 would allow sharing the (A0 & A2) subterm and overall reduce the gate count.


Or maybe some tricks to use NAND, NOR or XOR gates for some parts?



I don't care about different path length or races in the circuit as it's only going to drive LEDs and should be far too quick to see any of that.



Answer



I think I have managed to find the optimal solution (one of them) now. It uses all 24 gates of 6 ICs:



  • 2x 7486 (quad XOR)

  • 1x 7408 (quad AND)

  • 2x 7402 (quad NOR)

  • 1x 7432 (quad OR)


I've managed to find different solutions using only 23 gates but more ICs. I have a feeling there isn't a solution with just 5 ICs.



Note: The circuit outputs LOW when the LED should be on since my 7 segment LED has a common VCC.


schematic


simulate this circuit – Schematic created using CircuitLab


D3-D0 are the inputs with D3 being the MSB. A-G are the outputs with A being the top LED, then going clockwise around and last G being the center LED.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...