Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FPGA VGA_8 bit color image

Status
Not open for further replies.

hitx

Member level 2
Joined
Mar 16, 2007
Messages
49
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,723
Hi dear friends. There is something in my mind to ask. For example, I
want to display gray scale image on screen, what sould I do?
Most multimedia image supports 8 bit (3 bits RED,3 bits GREEN, 2 bits BLUE) which means that 256 different color can be
obtained. (pixel value changes between 0-255) However, on FPGA I will use 3 bits each pixel which means that only
8 different colors can be obtained between 0-7. Now how can I convert each 8 bit pixel
(0-255) into 3 bit (0-7) range??

Waiting for your help.

Thanks now.

Best wishes..

Hidayet
 

So you'll have 3 signal bits (R, G and B) inside the video controller. Now drive the Red, Green, and Blue pins of the FPGA that go to the DACs/resistor network from those three bits.

So for example tie 'Red' bit from the video controller to Red(2 downto 0), 'Green' bit from the video controller to Green(2 downto 0), and 'Blue' bit from the video controller to Blue(1 downto 0).
 

Thanks a lot for the reply. But I have already know that part of the codes. I just want to learn this part. For example, imagine a pixel value of 198 in 8 bit, what is its equivalent in 3 bit of range 0-7 ? I just want to clear that. I mean, for example in 200 in 8 bits, when I use that value in FPGA, RRRGGGBB, however I need to use 3 bit. I use spartan 3e- xcs1600e- fg320 fpga. I have not found all VGA pins for that FPGA. I just know Red=H14 ; Grn=H15 and Blue=G15. What about the rest?

Thanks
 

hi hitx,

Actually there is no one and one map for 24bits of RGB to 8bits of RGB. one thing you can do for conversion is that take the lsb bits of the RGB in the 24 bits and maps to the 8bits of RGB.
Means
[2:0] of 24bit RGB to [2:0] of 8bit RGB
[10:8] of 24bit RGB to [5:3] of 8bit RGB
[17:16] of 24bit RGB to [7:6] of 8bit RGB
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top