Binary to BCD converters

KA4HJH terrymbowman at rica.net
Fri Jun 19 02:21:42 CEST 1998


>How do I easily convert an 8 bit binary number to 3 BCD numbers?
>
>So far an EPROM lookup method seems like the only solution (brute force
>too). (Apart from a PAL)
>
>Actually I need to display the 8 bit data in my UP project as a 3 digit
>number. For instance
>
>0111 1111 will be displayed as 1 2 7

I get it. Well, you could go the EPROM or programable-logic route if you
have the know-how and the burner. There IS one other way I can think of:
hook a DAC to an ADC/display driver. Then you'd have 3-1/2 digits, signed.
Kind-of overkill but it would work once you got it trimmed right. You could
multiplex the DAC to drive multiple displays. I've never seen an ADC/driver
multiplexed to multiple displays but I suppose it could be done.

Actually, this is precisely the sort of situation where inexpensive little
MCU's come into their own. You waste a $2-3 chip on each display and be
done with it. Of course, you're trying to avoid that route. But it would
simplify the whole situation immensely. There's probably a market for a
pre-programmed decoder/driver like this.

BTW, have you thought about using a hexadecimal? At least it would
eliminate a display. Or you could use that "synth octal" (1-8) that was so
poplular at one time. I'd rather see funky 7-segment hex myself.

-----

Just had a flash. The 'ROM business has already been done, although it may
be long out of production (my National TTL book is dated 1976). The
74184/185 is/was a 256 bit ROM programmed to do this kind of conversion. It
takes three of them to convert 8-bit binary to three BCD digits. Wonder if
you can still get 'em???

Terry Bowman, KA4HJH
"The Mac Doctor"





More information about the Synth-diy mailing list