Running a 7-segment display off of a decimal input - Page 1
Forum section: electronics / general

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 03:09:55 am
content: 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!

author: Signal32
author_rank: Frequent Contributor
timestamp: July 29, 2016, 03:13:33 am
content: Hello,- What micro are you using ?- How many individual 7-segment digits are you trying to drive ?- What is the "selector switch thing", pictures ?

author: ebclr
author_rank: Super Contributor
timestamp: July 29, 2016, 03:29:29 am
content: If you objective is only that a bunch of 1n4148 diodes and a 7 180 resistor will solve your problem

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 03:44:29 am
content: 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.

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 03:54:00 am
content: 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)

author: Signal32
author_rank: Frequent Contributor
timestamp: July 29, 2016, 04:14:56 am
content: 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 IChttp://www.intersil.com/content/dam/Intersil/documents/icm7/icm7228.pdfWhat do the buttons do, are they simple press buttons ?What happens when you press a button, can multiple buttons be pressed at one time ?

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 04:20:33 am
content: Ok, what it would do is the button pressed on the front (0-9) will show that number on the columns display.

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 04:23:39 am
content: 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.

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 04:43:55 am
content: 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.

author: sleemanj
author_rank: Super Contributor
timestamp: July 29, 2016, 05:26:49 am
content: 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 keypadPart 2: Displaying the digitsHow 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.

author: Signal32
author_rank: Frequent Contributor
timestamp: July 29, 2016, 05:28:23 am
content: Quote from: sleemanj on July 29, 2016, 05:26:49 amYes, MAX7219 would have been my first suggestion also, unfortunately it doesn't support common anode.

author: rstofer
author_rank: Super Contributor
timestamp: July 29, 2016, 05:54:10 am
content: Quote from: Signal32 on July 29, 2016, 05:28:23 amI 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.

author: ebclr
author_rank: Super Contributor
timestamp: July 29, 2016, 09:33:27 am
content: http://www.ti.com/product/SN74154http://www.ti.com/lit/ds/symlink/cd4511b.pdfConect one to another and to display

author: ebclr
author_rank: Super Contributor
timestamp: July 29, 2016, 09:37:00 am
content: Sorry this is the right ichttp://www.ti.com/lit/ds/symlink/cd40147b.pdf

author: ebclr
author_rank: Super Contributor
timestamp: July 29, 2016, 09:45:45 am
content: If you wana go on the microprocessor wayTM1638Here one examplehttp://www.ebay.com/itm/8-Bits-LED-Digital-tube-Module-Keyboard-Scan-and-Display-Module-TM1638-MCU-/360822896129?hash=item5402b87601:g:i1oAAOxyUrZSu4wB

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 01:11:10 pm
content: 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.

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 01:18:26 pm
content: 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?

author: subway5411
author_rank: Newbie
timestamp: July 29, 2016, 09:14:13 pm
content: That circuit looks common cathode. Would this work on common anode like I have?

author: ebclr
author_rank: Super Contributor
timestamp: July 30, 2016, 03:10:39 am
content: For common anode change 4511 to HEF 4543 and conect pin PH to vcchttp://www.nxp.com/documents/data_sheet/HEF4543B.pdf

author: apurvdate
author_rank: Contributor
timestamp: August 03, 2016, 09:07:33 am
content: 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.

author: ebclr
author_rank: Super Contributor
timestamp: August 03, 2016, 11:09:04 am
content: He isn't using BCD switch, see photo on the beginning of the post

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 04, 2016, 01:46:21 pm
content: Quote from: subway5411 on July 29, 2016, 04:20:33 amWhen a button is pressed does it latch (stay on), or is it momentary (only on while pressed)?