BCD/Binary code switch to dual (0-15) 7 segment display  - Page 1
Forum section: electronics / projects

author: Merlyn
author_rank: Contributor
timestamp: May 24, 2017, 05:37:05 pm
content: Hello,Before asking I did some search on the subject but I couldn't find what I needed.So we have a BCD/Binary code switch like this one for example:https://media.digikey.com/photos/Omron%20Elect%20Photos/A6C-16R(N).jpgWhat I need is to interface it to a dual 7 segment display which will show numbers 0 to 15 or 1 to 16 corresponding to all 16 positions of the switch. Even better if the code switch can be omitted and an up/down BCD counter used instead.All this without using uCUs but only common CD series ICs if possible.I would appreciate if you point me to the right direction.

author: free_electron
author_rank: Super Contributor
timestamp: May 24, 2017, 06:22:16 pm
content: 4543 display driver4510 counter

author: Ian.M
author_rank: Super Contributor
timestamp: May 24, 2017, 06:41:26 pm
content: ... or build a diode matrix to translate 4 bit hex switch connections to 2x 7 segment digits. The easiest would be a double sided PCB populated with SMD diodes, but its easy evough to build with through-hole diodes on Veroboard. Don't fall into the trap of sandwiching the diodes vertically between two Veroboards with tracks at rightangles as it makes rework nearly impossible. Instead, for the diode top connections its best to use bare wire, with an insulated flywire for output.Edit: It does need a 4 to 16 line decoder to drive the matrix - the easiest is two 74xx138 3 to 8 line decoders. Also you may need more drive for the segments so a pair of ULN2003 high crrent drivers on the matrix output may be helpful

author: Merlyn
author_rank: Contributor
timestamp: May 24, 2017, 08:26:03 pm
content: Thanks for the input. The diode matrix came to mind but I would like to keep it as simple as possible.I still don't have an idea how to do it and make it unable to count more than 15 or 16 but I'll dig further.

author: Nusa
author_rank: Super Contributor
timestamp: May 24, 2017, 08:31:17 pm
content: And for still another approach:You have two seperate problems here:1) converting 4-bit binary to two 4-bit bcd digitsa) 10's digit-- Either 0 or 1. Solvable with simple logic to determine if the input is greater than 9. Three NAND gates can do that.b) 1's digit-- Solvable with a 4-bit adder. Using the logic from 10's digit, add 6 if input is greater than 9, else add 0. The bottom 4 bits of the result is the BCD digit.2) displaying the bcd digits-- Solved by bcd 7-segment drivers

author: Merlyn
author_rank: Contributor
timestamp: May 24, 2017, 08:58:43 pm
content: Turns out it's not going to be that simple after all. It looks like things are heading to uCU direction...

author: Ian.M
author_rank: Super Contributor
timestamp: May 24, 2017, 09:24:36 pm
content: Yes, its a no-brainer if you've already got the toolchain for an 8 bit MCU family. If not, its well within the capabilities of an ATmega328P running from its interbal oscillator and programmed using the Arduino toolchain, using an actual Arduino running the Arduino ISP sketch as the programmer if you don't have anything better.