8-bit binary value to 4 digit seven segment display.

  • Follow


Hello,

Im pretty new to FPGAs in general and so far have gotten some basic
things down such as get data from my ADC and be able to hardwire
certin values into my 4 digit 7-segment display, but now I need to
combine the two and Im not sure how. Basicly I get an 8-bit binary
number from my ADC, from there how would I turn that number into
usable values to display on my 4-digit 7-segment display? Im using a
refence voltage value of 2.55 V just to make it easier for the time
being, but how do I turn "11111111" into "2.550" on ym display?

Thank you much for your time,
Mark
0
Reply mwiesbock 10/5/2004 9:22:03 PM

"weizbox" <mwiesbock@gmail.com> wrote in message
news:335c6753.0410051321.2e23430c@posting.google.com...
> Hello,
>
> Im pretty new to FPGAs in general and so far have gotten some basic
> things down such as get data from my ADC and be able to hardwire
> certin values into my 4 digit 7-segment display, but now I need to
> combine the two and Im not sure how. Basicly I get an 8-bit binary
> number from my ADC, from there how would I turn that number into
> usable values to display on my 4-digit 7-segment display? Im using a
> refence voltage value of 2.55 V just to make it easier for the time
> being, but how do I turn "11111111" into "2.550" on ym display?
>
> Thank you much for your time,
> Mark

You need to find a binary to BCD converter


0
Reply del 10/5/2004 11:26:00 PM


On Tue, 05 Oct 2004 14:22:03 -0700, weizbox wrote:
> Im pretty new to FPGAs in general and so far have gotten some basic
> things down such as get data from my ADC and be able to hardwire
> certin values into my 4 digit 7-segment display, but now I need to
> combine the two and Im not sure how. Basicly I get an 8-bit binary
> number from my ADC, from there how would I turn that number into
> usable values to display on my 4-digit 7-segment display? Im using a
> refence voltage value of 2.55 V just to make it easier for the time
> being, but how do I turn "11111111" into "2.550" on ym display?

That's usually easier done with a tiny microcomputer.
or get busy and define your logic with 8 inputs and 7*4 = 28 outputs.

-- 
Juhan Leemet
Logicognosis, Inc.


0
Reply Juhan 10/5/2004 11:40:17 PM

Juhan Leemet wrote:

> On Tue, 05 Oct 2004 14:22:03 -0700, weizbox wrote:
> 
>>Im pretty new to FPGAs in general and so far have gotten some basic
>>things down such as get data from my ADC and be able to hardwire
>>certin values into my 4 digit 7-segment display, but now I need to
>>combine the two and Im not sure how. Basicly I get an 8-bit binary
>>number from my ADC, from there how would I turn that number into
>>usable values to display on my 4-digit 7-segment display? Im using a
>>refence voltage value of 2.55 V just to make it easier for the time
>>being, but how do I turn "11111111" into "2.550" on ym display?
> 
> That's usually easier done with a tiny microcomputer.
> or get busy and define your logic with 8 inputs and 7*4 = 28 outputs.
> 
Right, this is basically just a lookup table.

If you have 32-bit memory cells, you'll need 256 of them, for a total of 
1 kB for the entire table. If you note that the last digit will always 
be zero, you can get away with just 7*3=21 bits for each entry.

Terje

-- 
- <Terje.Mathisen@hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"
0
Reply Terje 10/6/2004 11:38:59 AM

Terje Mathisen wrote:
> If you have 32-bit memory cells, you'll need 256 of them, for a total of
> 1 kB for the entire table. If you note that the last digit will always
> be zero, you can get away with just 7*3=21 bits for each entry.

You don't need much logic (or program space) to convert binary to BCD, if
you do it as shift register. The BCD side "shifts" by doing BCD additions,
which means that you add 6 to all digits that otherwise would be >=A. I'd
also do the conversion to 7 segment sequentially (out of the final
converted BCD result), so you only need one 7-segment lookup table or
decoder.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/
0
Reply Bernd 10/6/2004 12:02:47 PM

4 Replies
550 Views

(page loaded in 0.365 seconds)

Similiar Articles:













7/25/2012 12:07:06 PM


Reply: