Author Topic: Running a 7-segment display off of a decimal input  (Read 12893 times)

0 Members and 1 Guest are viewing this topic.

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Running a 7-segment display off of a decimal input
« on: July 29, 2016, 03:09:55 am »
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!
 

Offline Signal32

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: us
Re: Running a 7-segment display off of a decimal input
« Reply #1 on: July 29, 2016, 03:13:33 am »
Hello,

- What micro are you using ?
- How many individual 7-segment digits are you trying to drive ?
- What is the "selector switch thing", pictures ?

 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Running a 7-segment display off of a decimal input
« Reply #2 on: July 29, 2016, 03:29:29 am »
If you objective is only that a bunch of 1n4148 diodes and a 7 180 resistor will solve your problem

 

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Re: Running a 7-segment display off of a decimal input
« Reply #3 on: July 29, 2016, 03:44:29 am »
That's my problem. I have to wire up 14 of these things and I'm not looking into buying 500 of those diodes lol. If I said that wrong, 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.
 

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Re: Running a 7-segment display off of a decimal input
« Reply #4 on: July 29, 2016, 03:54:00 am »
Got some pictures so you can understand me a bit better.

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)

 

Offline Signal32

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: us
Re: Running a 7-segment display off of a decimal input
« Reply #5 on: July 29, 2016, 04:14:56 am »
You do not specify the exact behavior of the system, so I will recommand feeding the input of the buttons into an Arduino and controlling the digits from the Arduino .
You definitely need a display driver to avoid everything getting to messy.
Using something like this you can drive 8 digits from a single IC http://www.intersil.com/content/dam/Intersil/documents/icm7/icm7228.pdf
What do the buttons do, are they simple press buttons ?
What happens when you press a button, can multiple buttons be pressed at one time ?
 

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Re: Running a 7-segment display off of a decimal input
« Reply #6 on: July 29, 2016, 04:20:33 am »
Ok, what it would do is the button pressed on the front (0-9) will show that number on the columns display.
 

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Re: Running a 7-segment display off of a decimal input
« Reply #7 on: July 29, 2016, 04:23:39 am »
This was originally used for Nixie tubes, so the switches aren't wired in BCD or anything. How would I wore the switches in BCD and prevent backfeed? Remember, I have to hook up 14 7 segment displays so I don't want times of diodes.
« Last Edit: July 29, 2016, 04:25:16 am by subway5411 »
 

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Re: Running a 7-segment display off of a decimal input
« Reply #8 on: July 29, 2016, 04:43:55 am »
I'm not chaining all 14 together, they will be individual, based on what number you choose in a row. Let's say you chose "2" in the first row, the first display would show "2" and so on.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3024
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Running a 7-segment display off of a decimal input
« Reply #9 on: July 29, 2016, 05:26:49 am »
Let us assume that you will use a microcontroller, because not doing so would be crazy.

There are two separate parts to your project.

Part 1: Reading the keypad
Part 2: Displaying the digits

How you accomplish Part 1 depends entirely on how the keypad is wired up... so how it is wired up.

Accomplishing part 2 can be done using 7-segment drivers (eg Max7219), or directly controlling each matrix and there is no shortage of googleable material out there.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline Signal32

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: us
Re: Running a 7-segment display off of a decimal input
« Reply #10 on: July 29, 2016, 05:28:23 am »
Accomplishing part 2 can be done using 7-segment drivers (eg Max7219)
Yes, MAX7219 would have been my first suggestion also, unfortunately it doesn't support common anode.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Running a 7-segment display off of a decimal input
« Reply #11 on: July 29, 2016, 05:54:10 am »
Accomplishing part 2 can be done using 7-segment drivers (eg Max7219)
Yes, MAX7219 would have been my first suggestion also, unfortunately it doesn't support common anode.

I think the display driver approach is the way to go.  I have such a board with 16 displays and it works quite well.  I'm using one of the Maxim chips, I believe.

I don't recall if it is common anode or common cathode but considering the cost of the displays, I would scrap what I had if it wouldn't work with the driver.  Displays are cheap, work-arounds for display drivers are ugly.

Since we're dealing with 70 inputs, I think I might be inclined to use a few IO expanders.  Maybe something like the 16 bit expanders from Microchip: http://www.microchip.com/wwwproducts/en/en023499.  One expander to cover the 0's and 1's, another for the 2's and 3's, etc.  Five expanders ought to do it.

Now the CPU only needs one SPI bus with 6 chip selects (5 for expanders and 1 for display).  The inputs could be scanned or, I believe, there is an interrupt on change capability.



 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Running a 7-segment display off of a decimal input
« Reply #13 on: July 29, 2016, 09:37:00 am »
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
 

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Re: Running a 7-segment display off of a decimal input
« Reply #15 on: July 29, 2016, 01:11:10 pm »
Exactly, that's what I was thinking of doing. If I were to wire those 2 chips together, how would I do it correctly? Does anyone have a schematic and will these chips work on common anode? Also, each row of 0-9 is its own circuit.
 

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Re: Running a 7-segment display off of a decimal input
« Reply #16 on: July 29, 2016, 01:18:26 pm »
Looks like the 74LS47 chip will work on common anode, but that is only the decoder. Is there a 10-4 encoder that will work with common anode? Or will I have to wire the 10 switches in BCD? If so, How?
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Running a 7-segment display off of a decimal input
« Reply #17 on: July 29, 2016, 09:11:13 pm »
 

Offline subway5411Topic starter

  • Newbie
  • Posts: 9
  • Country: ca
Re: Running a 7-segment display off of a decimal input
« Reply #18 on: July 29, 2016, 09:14:13 pm »
That circuit looks common cathode. Would this work on common anode like I have?
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Running a 7-segment display off of a decimal input
« Reply #19 on: July 30, 2016, 03:10:39 am »
For common anode change 4511 to HEF 4543 and conect pin PH to vcc


http://www.nxp.com/documents/data_sheet/HEF4543B.pdf
 

Offline apurvdate

  • Contributor
  • Posts: 43
  • Country: in
Re: Running a 7-segment display off of a decimal input
« Reply #20 on: August 03, 2016, 09:07:33 am »
Do you mean you're using thumbwheel switch (see attchment)? It has a common input terminal and 4 output terminals for BCD output.
If you want to interface multiple of these then use separate controller output line to individual COM input of switch & read BCD values on 4 input pins. No need of separate BCD read pins on controller side.
As for driving 7-seg display I'll prefer MAX7219 which is already mentioned. Trust me changing display type is much easier than finding proper driver. One MAX7219 can drive 8 digits. You can cascade as many as you can, over SPI or bit shift communication.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Running a 7-segment display off of a decimal input
« Reply #21 on: August 03, 2016, 11:09:04 am »
He isn't using BCD switch, see photo on the beginning of the post
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Running a 7-segment display off of a decimal input
« Reply #22 on: August 04, 2016, 01:46:21 pm »
Ok, what it would do is the button pressed on the front (0-9) will show that number on the columns display.
When a button is pressed does it latch (stay on), or is it momentary (only on while pressed)?
 
 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf