Previous in Forum: 460V 60Hz Equipments   Next in Forum: Fuel Consumption for Diesel Generator.
Close
Close
Close
51 comments
Rate Comments: Nested
Power-User

Join Date: May 2008
Posts: 306
Good Answers: 12

Binary to 2-Digit Seven Segment Display

08/10/2010 9:37 PM

I want to implement a design with basic IC's (i know micro controllers like PIC etc will do the job - don't have the programming knowledge) to convert any combination from 0000 to 1111 into a 2 digit seven segment display reading 0 to 15. Any ideas on how to do this? The aim is for a user to be able to plug in a connector into some equipment and the 2-digit display to show which channel they have plugged the connector to. So it's a little different to a counter as the value could be any number. display is common cathode.

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Participant

Join Date: Aug 2010
Posts: 3
#1

Re: Binary to 2-digit seven segment display

08/11/2010 1:31 AM

I don't know how IC's work as of right now, but do you know how to convert binary into decimal?

001 = 1

010 = 2

011 = 3

100 = 4

101 = 5

110 = 6

111 = 7

1's and 0's are like on (1) and off (0) "switches." I forget volts, but anything below a specific voltage means 1/0 and the above means the opposite.

So if you could use and/or gates for each connector and when power flows through the connecting socket it is allowed to travel through the gates and to the LED Digit display, but by using AND's and OR's you can flip/flop the 1's and 0's you send. I know this isn't quite what the answer you were looking for, but I hope it can help in some way, shape, or form.

Good luck!

Register to Reply Score 1 for Off Topic
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#2

Re: Binary to 2-digit seven segment display

08/11/2010 2:36 AM

Damn, I didn't read it carefully and have initially explained how to do it with a micro

With basic ICs its a pain in the backside.
Ha but you don't say how the data is present on this machie you are plugging into. If we assume it's parrallle data (eg one wire for each bit) then isn't there a display driver IC with parallel data input?

I'll leave this micro based solution as it may be useful to a passing troll.

Basic approach is to write a lookup table for the display segments which need turning on for each number.
E.G. For a single digit
Say your lookup table starts at memory location 1000
at 1000, you store the bit pattern to light the segments for '0' (there are 7 segments per digit so you can store 1 digit per memory location)

1001 display segments for 1
1002 display segments for 2
1003 display segments for 3 etc

For your 2 digit display the left digit is only going to display blank or 1 you can code this into the spare bit of each lookup entry (saves memory or ports).
Otherwise just have two entries in the lookup table, one for each digit, and each digit wired to a different port (very wasteful)
The lookup data is output onto a port with each bit wired to the appropriate segment of the display. bits 0-6 wired to digit 1 and bit 7 wired to a both bits to light the '1' on the second digit.|
You can outputs 1s or 0s depending on wether you are pulling the segments down to illumiate or pulling 'em up (some micros sink current better than they source it, and it depends if the display is common doodah or common whatsit. WTF are we still using terms like cathode and anode? I think in terms of plus/minus/pointy end etc?

To output your number (say5) you just add it to the lookup table start address (1000) which gives 1005, read the location 1005 and output it to the diplay port, bish bash, bosh, lightymost of the seggyfold.
Hope this makes sense.(obviously not the last bit)

Brevquot error process terminated
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply Score 1 for Off Topic
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#8
In reply to #2

Re: Binary to 2-digit seven segment display

08/11/2010 11:05 AM

in the olden days I used to do this sort of thing with a PROM - the littlest 8-bit wide one I could find (hate wasting space). 16 locations programmed. 7 data bits from each location for the 7 segs in the LSD, and 8th data bit for segs b and c of the MSD.

in the older olden days it was a 4-16 line decoder and a diode matrix. Does that count as "programmable"?

but that was all in the olden days. <sigh>.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Score 1 for Off Topic
Guru
Engineering Fields - Electrical Engineering - Hmmm...

Join Date: Jul 2010
Location: Maryland
Posts: 567
Good Answers: 29
#9
In reply to #8

Re: Binary to 2-digit seven segment display

08/11/2010 2:07 PM

Can you still buy PROM's?

That's actually not a bad idea. I can't imagine daffy has a PROM programmer laying around. And figuring out the bits to program it with might give him a headache, but it would work and it would be cheap.

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#12
In reply to #9

Re: Binary to 2-digit seven segment display

08/11/2010 3:50 PM

27C64 is the smallest I found from RS (£5.10 1 off).

My Sunny programmer long since died, as it had a PC bus card that wouldn't work at more than about 8MHz. I kept an ancient '286 machine in a corner for years 'til it finally shuffled off it's mortal coil.

Shame, as I had adapters & drivers for PICs, PALs, GALs & all sorts.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Score 2 for Off Topic
Guru
Hobbies - DIY Welding - Wannabeabettawelda

Join Date: May 2007
Location: Annapolis, Maryland
Posts: 7940
Good Answers: 458
#15
In reply to #9

Re: Binary to 2-digit seven segment display

08/11/2010 10:55 PM

Yup, you can still buy 22V10's

http://focus.ti.com/lit/ds/symlink/ticpal22v10z-25c.pdf

Cheers !

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#21
In reply to #15

Re: Binary to 2-digit seven segment display

08/12/2010 5:56 AM

22V10 isn't a PROM, it's a logic array.

(It would do the job, tho' ).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Hobbies - DIY Welding - Wannabeabettawelda

Join Date: May 2007
Location: Annapolis, Maryland
Posts: 7940
Good Answers: 458
#28
In reply to #21

Re: Binary to 2-digit seven segment display

08/12/2010 12:22 PM

Yeah, I know it's not a PROM but it's all you need to execute the logic for this task. Why somebody thinks it's off-topic is beyond me. I've noticed a lot of sniping on this forum and it's getting rather tiring. Oh well.

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#29
In reply to #28

Re: Binary to 2-digit seven segment display

08/12/2010 12:26 PM

Dunno who OT'd you either - but I took it away .

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Off Topic (Score 5)
Guru
Hobbies - DIY Welding - Wannabeabettawelda

Join Date: May 2007
Location: Annapolis, Maryland
Posts: 7940
Good Answers: 458
#32
In reply to #29

Re: Binary to 2-digit seven segment display

08/13/2010 12:28 PM

Thanks

That helps my hurt feelings. LOL

Register to Reply Off Topic (Score 5)
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#48
In reply to #8

Re: Binary to 2-digit seven segment display

08/16/2010 6:53 AM

Just for fun, here's the "older oldendays" solution:

Sorry about the image quality. The IC is a 74LS154 (still available - I found one on the 'net for £1.61). The 7-seg displays would (obviously) have to be common-anode, and would also have to be low-current types. HDSP-A101 would do. All resistors 2K7.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#49
In reply to #48

Re: Binary to 2-digit seven segment display

08/16/2010 10:22 AM

Just notice a couple of minor errors in the diode matrix, so if anyone's really interested, drop me a line & I'll post (or send you) an up-issue.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Off Topic (Score 5)
Anonymous Poster
#23
In reply to #2

Re: Binary to 2-digit seven segment display

08/12/2010 6:16 AM

CR4 ADMIN: Deleted Post #23

Vulgar/Rude/Improper Behavior: This post was deleted because it did not adhere to the behavioral policies of the site. Please review Section 14 of the CR4 Site FAQ and the CR4 Rules of Conduct.

Register to Reply Off Topic (Score 7)
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#26
In reply to #23

Re: Binary to 2-digit seven segment display

08/12/2010 7:06 AM

Del's was a great post...why are you so down on him for no reason whatsoever?

It is easier to do it with a PIC, he is dead right about that!!! I would hate designing it with logic chips today.....

May I recommend a PICAXE, very cheap and fast enough for this.....also easy to program with the free software and only an RS232 or USB cable needed for the hardware side of the programming!!!!

Available everywhere or by post. Start here:-

http://www.rev-ed.co.uk/picaxe/

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Score 1 for Good Answer
Anonymous Poster
#33
In reply to #26

Re: Binary to 2-digit seven segment display

08/13/2010 12:53 PM

how could it be a great post since it did not answer the question being asked. I realize that you somehow feel you have to have another Gurus back but really is this not taking it a bit too far.

Vulgar/Rude/Improper Behavior: This post was edited because it did not adhere to the behavioral policies of the site. Please review Section 14 of the CR4 Site FAQ and the CR4 Rules of Conduct.

Register to Reply Off Topic (Score 5)
Anonymous Poster
#35
In reply to #33

Re: Binary to 2-digit seven segment display

08/13/2010 2:17 PM

Admin please accept my apology, I did not realize that the use of the word "rectum" was vulgar/ rude or improper behaviour.

Register to Reply Off Topic (Score 5)
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#39
In reply to #35

Re: Binary to 2-digit seven segment display

08/13/2010 5:15 PM

I didn't see your post - but (putting 2 and 2 together), I suspect that it's not the word you used, but the context in which you used it.

If you can't say anything constructive, then why not just shut the f**k up and go away?

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Off Topic (Score 4)
Anonymous Poster
#40
In reply to #39

Re: Binary to 2-digit seven segment display

08/14/2010 6:44 AM

context in which you used it, yes perhaps that had something to do with it. The context was Andys head located internally in Dels rectum.

then why not just shut the f**k up and go away? That was a bit rude and uncalled for, don't you think.

Register to Reply Off Topic (Score 6)
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#41
In reply to #40

Re: Binary to 2-digit seven segment display

08/14/2010 6:58 AM

Rude, yes. Uncalled for, no.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Off Topic (Score 3)
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#43
In reply to #41

Re: Binary to 2-digit seven segment display

08/14/2010 11:21 AM

True, true!!!!

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Off Topic (Score 5)
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#42
In reply to #40

Re: Binary to 2-digit seven segment display

08/14/2010 11:20 AM

Definitely someone with a CR4 logon who does not have the Cojones to use his real logon - in fact a 1st class wimp!!

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Off Topic (Score 5)
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#36
In reply to #33

Re: Binary to 2-digit seven segment display

08/13/2010 3:13 PM

How about getting off my case?
Do you actually have any idea how long it took to write what was a serious attempt at a usefull answer?
I then realised my mistake and in a self derogatatory manner pointed it out.
I then considered that it may still be usefull so I struck it through but left it.
I write a lot of stuff which I self-edit and never actually post, but most of the time I do actually attempt to be both useful and entertaining. I'm not actually sure why someone somewhere seems to find this offensive?
I realise that not everone in the world will find me charming and witty, but trust me I've had may share of smacks on the jaw and torment, I just choose to try and remain cheerful and optomistic, the alternative of suicide is rather unpalatable, believe me I know. If you'd rather a dark depressed personna who bemoans the human condition I'm affraid I refuse to play that part.
I would however respectfully sugest that if you find my contributions unpalatable that you simply avoid them.
Indeed if my own personal troll would be good enough to identify him or herself I could likewise avoid them.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply Score 2 for Off Topic
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#37
In reply to #36

Re: Binary to 2-digit seven segment display

08/13/2010 3:39 PM

Great post, why off topic????

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Off Topic (Score 5)
Anonymous Poster
#50
In reply to #36

Re: Binary to 2-digit seven segment display

08/17/2010 5:36 PM

Tough crowd today. Someone out there must have a litter box that isn't clean.

Register to Reply Off Topic (Score 5)
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#51
In reply to #50

Re: Binary to 2-digit seven segment display

08/17/2010 6:27 PM

I expect you used it yourself and left a REAL mess!!!!

Try using the toilet the next time! Its meant for humans!

Oh sorry, did I misunderstand that you are human.

Please acceot my full apologies for that!!

....and of course, the litter box is available if you prefer that.......

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Off Topic (Score 5)
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#25
In reply to #2

Re: Binary to 2-digit seven segment display

08/12/2010 7:02 AM

LOL

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Off Topic (Score 5)
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#3

Re: Binary to 2-digit seven segment display

08/11/2010 5:24 AM

The easy bit is BCD to seven segment - use e.g. a couple of 4511Bs or 4513Bs.

Have to do a bit more to convert your binary to BCD (try a bit of Googling[1]), but it's not too much, as your MSD is only 0 or 1.

[1] Everyone seems to do it with programmable devices of one sort or another these days. I remember the 'good old days' ....

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Score 1 for Good Answer
Guru
Engineering Fields - Electrical Engineering - Hmmm...

Join Date: Jul 2010
Location: Maryland
Posts: 567
Good Answers: 29
#4

Re: Binary to 2-digit seven segment display

08/11/2010 8:38 AM

I agree with Del and JohnDG. Using basic logic IC's will be a pain. A single digit would be easy. Two digits isn't any harder, it's just that there is SO much more logic circuitry needed.

In a nutshell, you need to determine which binary numbers will turn on each individual LED segment. What you'll end up with is a big boolean equation for each segment (total of 14 equations). It will be every binary number (that lights up that segment) or'd together. Using boolean algebra, you can reduce the number of individual terms in each big equation. You would then create your physical circuit to match the reduced equations.

Simple, right?

I did this a few years ago in a system that had to read a binary number from a cable and displayed that number on a three digit display (decimal 0 to 255). The cable numbers were hard coded (pulled up or grounded) into 8 bits on the cable. I used programmable logic to do it. It was a single chip, but writing the code was almost as involved as programming a microcontroller.

Do you have control over how the numbers are coded on the cable? Can you have them coded in BCD instead of binary? That is, four bits for the decimal 1's place and the other four bits for the decimal 10's place. This would allow you to use two BCD to seven segment decoders (7448 ic's) making it much simpler.

Register to Reply Score 1 for Good Answer
Guru
Hobbies - Musician - Engineering Fields - Chemical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Instrumentation Engineering - New Member

Join Date: Jan 2007
Location: Moses Lake, WA, USA, Thulcandra - The Silent Planet (C.S. Lewis)
Posts: 4216
Good Answers: 194
#5

Re: Binary to 2-digit seven segment display

08/11/2010 8:50 AM

Intersil has some devices. Is the display LED or LCD?

See here for a circuit using a 4511 IC.

__________________
"Reason is not automatic. Those who deny it cannot be conquered by it. Do not count on them. Leave them alone." - Ayn Rand
Register to Reply Score 1 for Good Answer
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#6
In reply to #5

Re: Binary to 2-digit seven segment display

08/11/2010 9:23 AM

As far as I can see, the Intersil parts would still need external conversion from binary to BCD - they have the option of 4-bit binary to hex (0-9,A-F) or to code B (0-9, '-', H,E,L,P), but it doesn't seem to accept straight binary and convert to 2 display digits.

Same problem for the 4511 - it will only do 1 digit of BCD (diplay blanks for not-BCD binary values).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Hobbies - Musician - Engineering Fields - Chemical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Instrumentation Engineering - New Member

Join Date: Jan 2007
Location: Moses Lake, WA, USA, Thulcandra - The Silent Planet (C.S. Lewis)
Posts: 4216
Good Answers: 194
#7
In reply to #6

Re: Binary to 2-digit seven segment display

08/11/2010 10:52 AM

Oops, yeah. So for instance, using the ICM7211, you could get values on up to 4 digits, but only by multiplexing 4-bit serial binary inputs to direct them to the appropriate digit? And to do that, you pretty much need a microprocessor for timing; what the OP is trying to avoid.

__________________
"Reason is not automatic. Those who deny it cannot be conquered by it. Do not count on them. Leave them alone." - Ayn Rand
Register to Reply
Anonymous Poster
#10

Re: Binary to 2-digit seven segment display

08/11/2010 2:09 PM

If you don't mind using a single digit wich displays 0-9 and then letters for higher numbers (up to 16) you can use this chip.

Yahlasit

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#11
In reply to #10

Re: Binary to 2-digit seven segment display

08/11/2010 3:39 PM

As he'd only be displaying one digit, the aforementioned 4511B, 4513B etc. would be easier.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#20
In reply to #11

Re: Binary to 2-digit seven segment display

08/12/2010 5:51 AM

My bad - they'd display blank for 10 to 15.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Power-User

Join Date: May 2008
Posts: 306
Good Answers: 12
#13

Re: Binary to 2-Digit Seven Segment Display

08/11/2010 6:43 PM

Thanks for the responses...yes i did fairly extensive google-ing and most of the IC's and chips mentioned I already looked into. I was also prepared to use one 7-segment display and use the hex numbering (DM9370 or DM9368) but they are rare as hens teeth. The 2-BCD to 2 seven seg i also looked into but found it difficult to find something appropriate to convert binary to bcd.

The wiring/connection is already hard-wired. I need the user to plug in a parallel cable to sockets and see a readout of which channel it's plugged into.

I might need to go down the route of a PIC or something and talk/ask one software eng (which I'm trying to avoid!) to help.

Thanks for your assistance...if anyone else has any more clues, much appreciated.

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#14
In reply to #13

Re: Binary to 2-Digit Seven Segment Display

08/11/2010 7:23 PM

Simplest solution I can come up with (avoiding PICs etc) is a 4-16 decoder (check this search), and a little panel with 16 individual 3mm LEDs, labeled (appropriately ) 0, 1, 2 ... 15. Job done.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Score 1 for Good Answer
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#18
In reply to #14

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 2:42 AM

Hey John, you nailed it with that idea, GA.
I was wrapping up a tin of Tuna to send you, but I though I'd open it first to check the contents... Oh dear it somehow appears to be empty.
Nice bit of thinking outside the tin.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply Off Topic (Score 5)
Member

Join Date: Sep 2009
Posts: 9
Good Answers: 1
#16

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 12:41 AM

Hi daffy
if the binary number is only 4 Bit's can use the attached circuit.
regards
at your service

Register to Reply
Power-User

Join Date: May 2008
Posts: 306
Good Answers: 12
#17
In reply to #16

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 1:50 AM

MrCarlos...thanks...is there a link or can the cct be bigger?

Register to Reply
Member

Join Date: Sep 2009
Posts: 9
Good Answers: 1
#27
In reply to #17

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 11:20 AM
Register to Reply
Associate

Join Date: Dec 2006
Location: Chelmsford, Essex, England
Posts: 28
#19

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 3:59 AM

If you want to keep it really simple, there are some TTL IC's to do the job i.e. the 74SN47 or the low power equivalent (with the same drive capability) the 74LS47. These devices are BCD in, seven segment out, no latch. Note, these designations are for the Texas instruments devices. Other manufacurers may use different letter codes but the numbers will be the same.

Regards,

Tony Lee.

__________________
AL
Register to Reply Score 1 for Good Answer
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#22
In reply to #19

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 6:00 AM

That still only works for 0 .. 9

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Associate

Join Date: Oct 2009
Posts: 33
#24

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 6:54 AM

Unless I've mis-read this - not too unusual, these days!! - you want to display 0 - 15 from a 4-bit source. How about the display/driver from an old CB radio? They read 1 - 40 from a 5-bit channel switch. You may have trouble getting a "0" , but this sounds like a "cheap & cheerful" project. Good Luck.

Register to Reply
Anonymous Poster
#30

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 12:40 PM

I always opt for the simplest solution. You haven't said how the connectors would be detected as "plugged in". I'd just use a bank of LED's and a couple of transistor arrays (plus resistors as required); ULN200x series or ULN280x series, for instance, to light one of 16 LED's. You can get LED's small enough that a two-row array wouldn't take up much space and could have labels above and below each row to identify the channel. Of course, it's slicker to convert binary into a seven-segment display, but this approach also works -- just not as suspender snapping.

Register to Reply
Anonymous Poster
#31
In reply to #30

Re: Binary to 2-Digit Seven Segment Display

08/12/2010 4:36 PM

Kinda like #14?

Register to Reply Off Topic (Score 5)
Anonymous Poster
#34
In reply to #31

Re: Binary to 2-Digit Seven Segment Display

08/13/2010 1:15 PM

Yep. Must have missed that one. Good call.

Register to Reply Off Topic (Score 5)
Member

Join Date: Sep 2009
Posts: 9
Good Answers: 1
#38

Re: Binary to 2-Digit Seven Segment Display

08/13/2010 4:07 PM

Hi daffy

As far as I understand you have a system that generates the binary numbers from 0000 to 11111.
You want these numbers to be represent in two 7-Segment Displays.
Now, as those numbers are in binary format these must be encoded to BCD in order to be shown on the display as decimals.

There are 4 methods to convert binary to BCD and an integrated circuit that is already doing.

The integrated circuit that already doing is: DM74185A
You can find out it´s data sheet from here:

http://www.alldatasheet.com/


Method A:
BCD-To-Binary Converter.
a. Examine the three Most Significant bits. If Sum is Greater Than four, add three and shift one bit left.
b. Examine Each BCD decade. If Sum is Greater Than the four, add three and shift one bit left.
c. Repeat step b Until the least-significant binary bit is in the least-significant BCD location.

Method B:
Add 6 to each decade.
00 to 19 + 00.
20 to 29 + 06.
30 to 39 + 12.
40 to 49 + 18. Etc.

Method C:
Make a circuit with Counters:
2 Binary Counters Counting Descending.
2 Decade Counters Counting Ascending.

Program The Binary Counters with the number to be converted.

Apply the same pulse generator to Both counters Binary And Decade.

When the binary counters reach zero, the decade counters have the number in BCD.

Method D:
This method is used by the IC DM74185A
It uses a ROM or RAM where the address is the binary number and data in this Address is the number in BCD.


Now, the circuit I attached a few days ago use the method B which adds 6 to each decade.

sees that it is composed with two full adders and some gates "AND" and "OR ¨.

is very easy as you may discover after analyzing it.

You're trying to find a BCD to 7 Segment decoder but the first thing is to look for Binary to BCD converter.

Try to get a simulator to test the circuit that I attach.

these simulators can be: LiveWire, CircuitMaker, Multisim, Proteus.

this software can get on this forum:

http://www.forosdeelectronica.com/

Or in Google.com.

regards

at your service.

Register to Reply
Guru
Popular Science - Biology - New Member Hobbies - Musician - New Member APIX Pilot Plant Design Project - Member - New Member Hobbies - CNC - New Member Fans of Old Computers - ZX-81 - New Member

Join Date: Jan 2007
Location: Centurion, South Africa
Posts: 3921
Good Answers: 97
#44

Re: Binary to 2-Digit Seven Segment Display

08/15/2010 6:33 PM

In the 8058A era one could use a 8255A peripheral driver (4x6 keyboard decoder and display driver)

it could turn a 16bit word into a 7 digit + 3 digit exponent seven segment display.

All the digits were placed on the 7 line bus and each of them was enabled (multiplexed) by a 4 to 16 decoder.

For later models one can have a look at the specks of a 82C55A or one of the 32 bit drivers.

The x86 chip have a function AAA (or something - ASCII Fix Accumulators) to convert the integer into a string.

__________________
Never do today what you can put of until tomorrow - Student motto
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#45
In reply to #44

Re: Binary to 2-Digit Seven Segment Display

08/15/2010 7:56 PM

"In the 8058A era ... " Shouldn't that be 8085?

The 8255 is/was just a parallel I/O device - without a micro running the right program, there's no way it could take 4-bit binary and convert it to the signals to drive 2 seven-seg displays. Sorry, just not possible.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Off Topic (Score 5)
Guru
Technical Fields - Technical Writing - New Member Engineering Fields - Piping Design Engineering - New Member

Join Date: May 2009
Location: Richland, WA, USA
Posts: 21017
Good Answers: 795
#46

Re: Binary to 2-Digit Seven Segment Display

08/15/2010 9:48 PM

I don't think BCD would be helpful here; the decimal value would still have to be mapped to the display segments.

How about a simple table lookup that for each binary number from 0 to 15 just specifies which segments are to be lit?

[I hope to continue this, but my present idea is too kludgy. Back to drawing board.]

__________________
In vino veritas; in cervisia carmen; in aqua E. coli.
Register to Reply
Guru
Popular Science - Biology - New Member Hobbies - Musician - New Member APIX Pilot Plant Design Project - Member - New Member Hobbies - CNC - New Member Fans of Old Computers - ZX-81 - New Member

Join Date: Jan 2007
Location: Centurion, South Africa
Posts: 3921
Good Answers: 97
#47

Re: Binary to 2-Digit Seven Segment Display

08/16/2010 4:21 AM

The trick is to convert the binary number to BCD.

Example 22 which is 10110 need to be converted to 0010 0010

Or 35 which is 100011 need to be converted to 0011 0101

The 4 bit nibbles can then be exported to a digit driver (74C48 maybe)

The following is a method (not the best – but understandable) to do the conversion

R = binary value

C = register for counting

Start C=0

By deducting 10 (1010) from R and incrementing C until R < 1010 (ten)

C and R will contain the BCD code.

Example 22

10110

-1010 [c=1]

= 1100

-1010 [c=2]

= 0010 [smaller than 10 è R = 0010 [2]]

Example 35

100011

-1010 [C=1]

= 11001

-1010 [c=2]

= 1111

-1010 [c=3]

= 0101 [smaller than 1010 [ten] è R = 5

__________________
Never do today what you can put of until tomorrow - Student motto
Register to Reply
Register to Reply 51 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

alba16384 (1); Andy Germany (6); Anonymous Poster (9); Brave Sir Robin (3); daffy (2); Hendrik (2); IncognitoCSCI (1); JohnDG (15); Lo_Volt (2); Mikerho (2); MrCarlos (3); Tornado (1); user-deleted-1105 (3); Zadok (1)

Previous in Forum: 460V 60Hz Equipments   Next in Forum: Fuel Consumption for Diesel Generator.

Advertisement