[sdiy] binary to two 7 segment display thingy..
René Schmitz
uzs159 at uni-bonn.de
Mon Aug 2 22:11:24 CEST 2004
Hi Nils and all,
nice solution!
I think it can be simplified even further, comparing against less or
equal 7 means just that bit 3 must be 0, so you can use that directly to
control the B2 and B3 inputs of the adder.
Cheers,
René
nils wrote:
> Someone asked about that some hours ago, how to converting 4-bit numbers to two
> bcd's from 01 to16.
>
> That was a nice puzzle. How to do it with few and cheap standard parts? Here is
> the solution I came up with.
>
> I just use a 4bit adder and a 4 bit comparator. Outputs are two BCD's ready to
> be feed into a decoder chip.
>
> The trick is to take the binary input and compare it against 8. If the number
> is lower or equal to 7 I just add one (for the numbers 1 to 9), otherwise I'll
> add 7. The overflow inside the adder will signal numbers higher than 9 on the
> carry output and adjust the adder sum to be between 0 and 6 again. It doesn't
> even need any gluelogic :)
>
> I haven't simulated it though, if you want to use it you'll better check it..
>
> Bye,
> Nils
>
> 74HC283
> +-------+
> >------+---------------------|A0 S0|------>
> binary >-----+|---------------------|A1 S1|------> to low digit
> input >----+||---------------------|A2 S2|------> bcd->7segment decoder
> >---+|||---------------------|A3 S3|------>
> |||| 1--|B0 |
> |||| +------|B1 C0|---0
> |||| +------|B2 |
> |||| 74HC85 | 0--|B3 C1|------>
> |||| +-------+ | +-------+ 0---> to high digit
> |||+-|A0 A<B| | 0---> bcd->7segment decoder
> ||+--|A1 A=B| | 0--->
> |+---|A2 A>B|----+
> +----|A3 |
> 0--|B0 2|--0
> 0--|B1 3|--1
> 0--|B2 4|--0
> 1--|B3 |
> +-------+
>
>
--
uzs159 at uni-bonn.de
http://www.uni-bonn.de/~uzs159
+
More information about the Synth-diy
mailing list