Computing Shield VGA dim and limited usable range


Keithgf

Recommended Posts

I'm using a Computing Shield with a BEMICRO MAX 10 FPGA board. It has +3.3v GPIO. I'm using (4) PMOD headers with a custom 12" cable. It was longer than I wanted, but it's what I've got. This is a cable made from Pololu Electronics -- basically DIY pre-crimped M/F header cables. I'm driving it with my own Verilog design. This is a custom computer.

I've got the 12 digital color bits + hsync + vsync + GND hooked up. I've done VGA FPGA projects before and have some familiarity. I'm running it at 800 x 480, ~31.6khz/60hz, if it matters. Samsung 21.X inch IPS LED monitor.

I've got the 12 least significant bits(MSB is on the left/top) of a 16-bit word mapped to RGB. The top bits are unused. So bits 11-8 go to Red, 7-4 go to Green, and 3-0 go to Blue.

When I output 0x0FFF, I get a dim shade of gray, when I would expect to see a purer, cleaner, brighter white. Black at 0x0000 is fine.

When I output 0x0F00, I get a pure red, but it seems awfully dim to me. The other colors like Green (0x00F0) or Blue (0x000F) are similar. Blue is actually the worst. This isn't a bright blue like I would expect.

Only nibble values of 0xA to 0xF produce visible colors on the display. Anything under 0xA is so dark that the color turned on isn't discernible.

I reverse engineered the pinout from looking at the PCB and using the Papilio Duo that it would normally connect to for the pin names. An image showing the BOTTOM of the computing shield with associated pin names would have really been helpful.

The image is crisp and stable.

I can use a scope and get output voltages. Will the computing shield output the full range of voltages? Meaning does a digital input of 0000 correspond to 0v, and 1111 to +0.7v? Any chance you have a chart the shows the corresponding voltages to expect given the input? Ie given your resistor values?

I'm inclined to think I've got a wire/pin mapping problem. or reversing the order of the bits or something.

Any thoughts or things to try?

Thanks

Keith

Link to comment
Share on other sites

Various minor thoughts, none of them very novel but I'll toss them out here:

At http://papilio.cc/index.php?n=Papilio.ClassicComputingShield there are tables of pin mappings according to various notations.

I wonder if settings for output current or drive strength, on the FPGA pins used for VGA, could be an issue?  I haven't dealt with those, and it's probably completely different on Altera.  Hooking a scope up to the digital lines (where you'd expect 3.3V) might help solve this problem.

I don't have firsthand experience of the Computing Shield, but I'd expect that it generates pretty much full range 0 to 0.7v.  I've used the Papilio Arcade MegaWing and didn't find the colors to be dim.

If the order of bits were reversed, then I'd expect some low nybble values like 2 or 4 to show up brightly, which isn't what happened.

Pick 8 of the 12 VGA color bits and put them on the (I think) 8 LEDs on the BeMicro Max 10.  Then display colors.

Pick just one of the 12 VGA color bits and put it on all 12 of those pins.  Then trying displaying all possible color values.

Link to comment
Share on other sites

More:

I'm not aware of there being any chart mapping bit values to voltages.  That doesn't mean there isn't one.  I'd expect it to be pretty nearly linear, at least that's what I guess as "ideal."

So if you measure the actual binary-analog relationship you're getting (between nybble values within your Verilog, and voltages at the VGA pins), it might tell you something.  In particular: Is it the same for all three colors? Do certain bits make more or less difference than you'd expect, assuming linearity?  Does any actually match what you'd expect for that bit, or one of the other bits, assuming linearity and a 0.7v full range?

Does this FPGA have configurable output voltages (less than 3.3v)?  Any chance one of those is in use?  But it seems unlikely to cause the major difference you're seeing.

 

Link to comment
Share on other sites

Please take a look at the VGA section for the VGA circuit of the Computing Shield:

http://papilio.cc/index.php?n=Papilio.ClassicComputingShield#vga

This is probably the important part that is affecting your design:

Quote

The way the desired output voltage is accomplished is by carefully managing the parallel voltage that the 4 resistors add up to. Using a Parallel Resistance Calculator we see that 500 ohm, 1000 ohm, 2000 ohm, and 4000 ohm give a total resistance of 266 ohm. The final key bit of information is that there is a 75 ohm resistance built into VGA cables, so that means that the point where our 4 resistors come together on our VGA connector forms a Voltage divider circuit. Using a Voltage Divider calculator with 3.3V as the Input Voltage, 266 ohm as R1, and 75 ohm as R2 we end up with an Output Voltage of .73V. The end result is that if all 4 resistors are set to ‘1’ then we will see .73V at the VGA connector. If all 4 resistors are set to ‘0’ then we will see 0V at the VGA connector, any combinations in between will give us evenly stepped voltages between 0 and .73V. The voltages will be evenly stepped because we picked resistors that double in size. 

The VGA cable should be providing 75 ohm resistance. If you are not using a VGA cable with 75 ohm's then that might be why the colors look dim?

Jack.

Link to comment
Share on other sites

Thanks Jack and Jaxartes for the replies.  I've read them each a couple times. And read the section Jack linked to a few times, even before I posted originally.

The FPGA does have configurable voltages, but I've been very careful to set them to +3.3v. It defaults to 8ma drive strength, but I tried adjusting it to "Maximum current" with no effect.

I can double check the digital input pins for proper voltage.

The 12" cable mentioned is on the digital side. Between the computing shield header and the FPGA GPIO header.

I am using a regular proper VGA cable on the analog side between the VGA connector of the computing shield and the monitor.

What bothers me isn't so much the dimness, but the lack of range. The advantage of a 4-bit per color DAC is so that you have 16 distinct brightness levels per color. My current setup has only 0xA through 0xF usable, anything less than 0xA is black. So I end up with about 5-6 distinct brightness options per color, which gives me sort of hundreds of colors instead of thousands of colors.

Note I'm not really blaming the shield -- it may be the simplest part of the equation. There's lots of moving parts here, and something along the way is breaking down. I'm just trying to figure out what that is.

I'll also connect the output of a color on the analog side to ground via a 75-ohm (or close) resistor, and then measure that voltage.

I'll also try outputting blocks of color from 0 to 16 on each color.

Thanks

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.