Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 30
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
No birthdays today

Next birthdays
05/07 a.gutzeit (64)
05/08 wpk5008 (35)
05/09 Alfons (37)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

8Bit binary to 12Bit BCD

Move Thread LAN_403
Madgyver
Sat Mar 11 2006, 03:55PM Print
Madgyver Registered Member #177 Joined: Wed Feb 15 2006, 02:16PM
Location: Munich, Germany
Posts: 214
Hi,

I want to display a 8Bit binary number as 3digit decimal number with 3 LED displays. The main problem I encounter now, is that most decoders only accept 0-9 bcd or hexadecimal input.

That means for example, that a decimal "20" in binary will be 0001 0100 whcih I cant feed into de decoder.

Is there a easy way to solve this?
Back to top
Steve Conner
Sat Mar 11 2006, 04:38PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
The old-fashioned way to do that is with a PROM containing a lookup table. The table has 256 entries that say which number to display on each of the three displays. Since it takes 4 bits to specify what each display shows, you need a PROM with 256 12-bit locations, and three decoder chips. If you put on your propeller hat for a minute, you can probably imagine how to multiplex a single decoder chip amongst three displays, and at the same time do away with the need for a 12-bit-wide memory.

The easiest way to do it nowadays is with a PIC or similar cheap microcontroller chip programmed with a binary-to-BCD conversion routine. You don't need to write the routine yourself: the manufacturer of the chip should provide a library (although it is a good exercise to try doing it yourself)
Back to top
Bjørn
Sat Mar 11 2006, 04:58PM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
You can also use 3 decade counters connected in series to two 4 bit binary counters. Counting to 255 does not take any significant time.

Personally I would have used the PIC method. Depending on the rest of your circuit you may get away with just a single $3 chip.
Back to top
Madgyver
Sat Mar 11 2006, 05:11PM
Madgyver Registered Member #177 Joined: Wed Feb 15 2006, 02:16PM
Location: Munich, Germany
Posts: 214
Well I would prefer an AVR anyway, but I want to do it without a µC. The reason is: Its, just for fun.

Thanks so far for the 2 Methods, you two cheesey
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.