8 bit to 3x7 segment display

Plamen

Joined Mar 29, 2015
101
OK, if you want to try @crutschow's method, you can go ahead.

But here I would like to show you how to convert a 4 bit binary number to 2 digit BCD and show them as 2x 7-segment numbers on proteus.

Using this example you might be able to figure out how to convert an 8-bit binary to 3x 7 segment LED digits...;):D

First generate the truth table using excel.
View attachment 143774

Based on the table, write 5 boolean expressions for D4-D0 wrt to D,C,B,A.
You can use KMap or whatever tools you have.

Put the 5 expressions on proteus and try out the sim.

View attachment 143776
Now do you think you can do an 8 bit version of this?

Allen
Petkan:
What you so far discuss is a combinatorial logic. We decode all combinations and then code each to 7 segment code.
This is rapidly becoming monstrous with increase of number of bits. To decode 256 combinations and then encode each to 3x7 segment (up to 21 diodes or inputs of OR gates each) is ugly approach. Here is another option:
1. Apply the 8 bits to the parallel inputs of 2x'193 counters (say 74HC193).
2. Make the two IC counter operate in reverse, and arrange its borrow output to drive its parallel load input.
So far we made a counter convert the binary code to number of pulses.
3. Make a BCD counter (3x74HC192). This will convert the number of pulse into 3 BCD encoded numbers
4. Convert to 7 segment code (3x74HC47) with ballast resistors.
5. Create a control circuit, providing conversion clock to the counters and sequentially directing it to the binary and BCD counters.
The total TTL chips required is 2x'193+3x'192+3x'47 + 555 (clock) +'74+'00 (control) = 10 ICs
The BCD counters do not have to be reversive ('192) neither synchronous. Any ripple counter would do.
 

dl324

Joined Mar 30, 2015
16,916
This is rapidly becoming monstrous with increase of number of bits. To decode 256 combinations and then encode each to 3x7 segment (up to 21 diodes or inputs of OR gates each) is ugly approach. Here is another option:
Unfortunately, you've missed the entire point of the question. The question required constructing a circuit to do the conversion.
I can only use basic logic gates (AND, OR, XOR, etc.).
The number of IC's required wasn't given as a consideration.

This is my solution for 8 bits:
upload_2018-2-2_10-52-4.png

It required 7 of the 4 bit converters I designed.

Again, not giving away any more information than the 74185 datasheet...
 

munim.s75

Joined Mar 11, 2020
1
----Continue from post #24

Here are the files..
1. The zip file is the design file in proteus 7.80
2. The hex file for lower data ROM
3. The hex file for upper data ROM

And the original source of the hex files.
Code:
; lower data ROM
    ORG     0000
    DB    00H,01H,02H,03H,04H,05H,06H,07H,08H,09H    ;000
    DB    10H,11H,12H,13H,14H,15H,16H,17H,18H,19H    ;010
    DB    20H,21H,22H,23H,24H,25H,26H,27H,28H,29H    ;020
    DB    30H,31H,32H,33H,34H,35H,36H,37H,38H,39H    ;030
    DB    40H,41H,42H,43H,44H,45H,46H,47H,48H,49H    ;040
    DB    50H,51H,52H,53H,54H,55H,56H,57H,58H,59H    ;050
    DB    60H,61H,62H,63H,64H,65H,66H,67H,68H,69H    ;060
    DB    70H,71H,72H,73H,74H,75H,76H,77H,78H,79H    ;070
    DB    80H,81H,82H,83H,84H,85H,86H,87H,88H,89H    ;080
    DB    90H,91H,92H,93H,94H,95H,96H,97H,98H,99H    ;090
    DB    00H,01H,02H,03H,04H,05H,06H,07H,08H,09H    ;100
    DB    10H,11H,12H,13H,14H,15H,16H,17H,18H,19H    ;110
    DB    20H,21H,22H,23H,24H,25H,26H,27H,28H,29H    ;120
    DB    30H,31H,32H,33H,34H,35H,36H,37H,38H,39H    ;130
    DB    40H,41H,42H,43H,44H,45H,46H,47H,48H,49H    ;140
    DB    50H,51H,52H,53H,54H,55H,56H,57H,58H,59H    ;150
    DB    60H,61H,62H,63H,64H,65H,66H,67H,68H,69H    ;160
    DB    70H,71H,72H,73H,74H,75H,76H,77H,78H,79H    ;170
    DB    80H,81H,82H,83H,84H,85H,86H,87H,88H,89H    ;180
    DB    90H,91H,92H,93H,94H,95H,96H,97H,98H,99H    ;190
    DB    00H,01H,02H,03H,04H,05H,06H,07H,08H,09H    ;200
    DB    10H,11H,12H,13H,14H,15H,16H,17H,18H,19H    ;210
    DB    20H,21H,22H,23H,24H,25H,26H,27H,28H,29H    ;220
    DB    30H,31H,32H,33H,34H,35H,36H,37H,38H,39H    ;230
    DB    40H,41H,42H,43H,44H,45H,46H,47H,48H,49H    ;240
    DB    50H,51H,52H,53H,54H,55H                    ;250
    END
Code:
;BIN TO BCD UPPER_ROM DATA
    ORG    0000
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    00,00,00,00,00,00,00,00,00,00    ;LINE 1-10
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    01,01,01,01,01,01,01,01,01,01    ;LINE 11-20
    DB    02,02,02,02,02,02,02,02,02,02    ;LINE 21-26
    DB    02,02,02,02,02,02,02,02,02,02    ;LINE 21-26
    DB    02,02,02,02,02,02,02,02,02,02    ;LINE 21-26
    DB    02,02,02,02,02,02,02,02,02,02    ;LINE 21-26
    DB    02,02,02,02,02,02,02,02,02,02    ;LINE 21-26
    DB    02,02,02,02,02,02,02,02,02,02    ;LINE 21-26
    END
I am not good in C or else I'd be able to generate the source code using a short C program.

Allen
Hello, how to change the location path for the hex files?
 
Top