Running a 7 segment display with a single decimal input

Thread Starter

subway5411

Joined Jul 28, 2016
9
Hello, I'm new to this whole microprocessor thing, and I am trying to run a 7 segment display through a decimal. (0-9) I have this selector switch thing that will allow you to choose a number / output from 0-9, and I want the LED display to respond to that. I kinda looked this up online and what I found could work was to use a Decimal to BCD encoder, then a BCD to 7 segment decoder. This runs off of 3.3v with each display having 7 200 ohm resistors. I am also using a common anode display. Could someone let me know what I need to do this?

Thanks!
 

absf

Joined Dec 29, 2010
1,968
A picture of your selector switch would be helpful...
Since you're using 3.3V, the 7-segment decoder has to be in CMOS chip like 4511/4513/4543.

Allen
 

Thread Starter

subway5411

Joined Jul 28, 2016
9
What I am trying to do is get a number from a single push button. Ex, Pressing 0, will display 0, and so on. I have this keypad from 0-9 out of an old nixie box that i'm trying to hook up to an LED display. They are just simple chained push button switches.

Here is the selector: (One row goes to one display)



Here is the unfinished LED Board, which has 7 digits: (For each row of 0-9 on selector)

 

absf

Joined Dec 29, 2010
1,968
How was the wiring at the back of the buttons? Are they wired like a matrix, or each button contributes one wire with a common wire for all the 10 buttons?

It looks like each button has more than 2 contacts.

Allen
 

Thread Starter

subway5411

Joined Jul 28, 2016
9
How was the wiring at the back of the buttons? Are they wired like a matrix, or each button contributes one wire with a common wire for all the 10 buttons?

It looks like each button has more than 2 contacts.

Allen
The buttons are not wired in a matrix. Yes there is a big common for all 10 buttons in a row. Is there a way to wire these buttons in a BCD array? If so how? Or is there a 10 to BCD converter I can use? These are common anode.
 

absf

Joined Dec 29, 2010
1,968
You'd need a 10 line to BCD encoder chip 74LS147. See datasheet attached.

I think this chip is no produced anymore. You can also do it by programming an EPROM or use discrete logic chips to perform the function for you.

Allen
 

Attachments

Thread Starter

subway5411

Joined Jul 28, 2016
9
You'd need a 10 line to BCD encoder chip 74LS147. See datasheet attached.

I think this chip is no produced anymore. You can also do it by programming an EPROM or use discrete logic chips to perform the function for you.

Allen
Ok, that's what I was thinking. Would this chip work on 3.3v and work a common anode display?
 

absf

Joined Dec 29, 2010
1,968
Or you can use 2 pieces of MC14532B and cascade them to form a 10 to BCD encoder.

See P6 of the datasheet attached.

This chip would work from 3 - 18V Vcc.

Allen
 

Attachments

Last edited:

Thread Starter

subway5411

Joined Jul 28, 2016
9
How would I wire this? It doesnt look like there is 10 inputs. It goes from I1 to I9. My box goes from 0-9, not 1-9.

Again, Please make sure this works with common anode.
 

absf

Joined Dec 29, 2010
1,968
How would I wire this? It doesnt look like there is 10 inputs. It goes from I1 to I9. My box goes from 0-9, not 1-9.

Again, Please make sure this works with common anode.
Yes, you're right. I also noticed it when I studied the datasheet of 74HC147. That's the first problem to solve.

When pressing one of the 10 buttons (1-9), the corresponding number was displayed. But when the button is released, the display would go back to dispaly "0" which is default when no button is pressed.

The outputs of 4511 are for common cathode displays, so I just use 7 inverters to invert the outputs so it would work with common anode display.

Here is my first design. Dont rush to buy the parts yet. There are some problems to be solved before the schematic is finalized.

SUBWAY5411-A.PNG

Allen
 
Last edited:

absf

Joined Dec 29, 2010
1,968
I have this keypad from 0-9 out of an old nixie box that i'm trying to hook up to an LED display. They are just simple chained push button switches.
Are your buttons locking or non-locking?
 

absf

Joined Dec 29, 2010
1,968
In that case, the circuit in post #13 should work.:)

Just leave out button "0" and connect buttons 1-9 to I1-I9. So when button "0" is pressed, it's like no button press, and the '147 would display the default "0" on the 7 segment CA LED.

Allen
 

absf

Joined Dec 29, 2010
1,968
Yes, that's the purpose of the ULN2003A. To turn CC into CA display.

Only thing is that the "6" and "9" will not look nice like a calculator on the 4511 or 7447 chips.

Allen
 
Top