Author Topic: testing homebrew vga controller  (Read 3078 times)

0 Members and 1 Guest are viewing this topic.

Offline Dan MoosTopic starter

  • Frequent Contributor
  • **
  • Posts: 357
  • Country: us
testing homebrew vga controller
« on: January 22, 2018, 05:39:31 am »
As mentioned in previous posts, I am building a VGA controller. I have my Hsync and Vsync pulses working with correct timings for 640x480 at 60hz.

I am trying to do a simple test. I'm using an LCD monitor (Dell 1702fp if it matters).

I have my sync pulses, and ground connections as they should be. I was hoping if I sent a full .7 volt signal to say, the red channel, I should get a solid red screen, right? That is what I've tried. I have a measured .7 volts on the red channel''s pin, and the other two are grounded. The monitor briefly reports an analog signal, and goes into 640x480 59hz (says so when I hit the settings menu on the front panel) Not sure why its goes into 59 hz, and not 60, but maybe that's a clue. My pulse timing and pulse widths measure perfectly  for the standard.

Anyway, instead of my desired red screen, I get faint grey vertical lines.

Do I HAVE to blank at during each vertical retrace? right nlow, since I'm just holding the color channel constant, nothing is turned off during the vertical pulses, or the front and back porches. I'd hoped for this simple test that that wouldn't be needed.

Grounding all three channels gives me the same faint vertical lines, not a blank screen as I'd hoped. Nothing I do with the color channels seems to matter actually.

My Hsync and Vsync pulses are 5 volts, active low (the deafult state is 5 volts, and the pulses go to 0)

Hsync pulses are 31.8 us apart. pulse is 3.8 us wide.

Vsync pulses are about 1.7 ms apart. Pulse is 64 us wide.

Any thoughts?

EDIT:

follow up question. I initally had used a voltage divider to get .7 volts, but when I hooked up the cable, that turned into .3 or so. This makes me think that there is about 75 ohms or so of a load on my signal when I send it in (plus no doubt a clamping diode). What is the proper way to present the signal to the monitor? Lets say one bit per channel, coming from 5 volt logic. By my math, if the input to the monitor is a 75 ohm load, if i send it 5 volts in series with  a 470 ohm resistor, that should get me a full .7 volts. Is this what I want to do?
« Last Edit: January 22, 2018, 05:47:36 am by Dan Moos »
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: testing homebrew vga controller
« Reply #1 on: January 22, 2018, 07:50:47 am »
Monitors usually require the R/G/B signals to be black outside of the active picture area.

The seem to use this as a black level reference
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 
The following users thanked this post: Someone

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4525
  • Country: au
    • send complaints here
Re: testing homebrew vga controller
« Reply #2 on: January 22, 2018, 09:25:18 am »
This makes me think that there is about 75 ohms or so of a load on my signal when I send it in (plus no doubt a clamping diode). What is the proper way to present the signal to the monitor? Lets say one bit per channel, coming from 5 volt logic. By my math, if the input to the monitor is a 75 ohm load, if i send it 5 volts in series with  a 470 ohm resistor, that should get me a full .7 volts. Is this what I want to do?
Due to the possibly long cable and fast edges of the video signal its a 75 ohm system with controlled impedance to avoid reflections. Your source impedance needs to be 75 ohms so any resistive divider needs to present that output impedance.
 

Offline John Heath

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: ca
  • 2B or not 2B
Re: testing homebrew vga controller
« Reply #3 on: January 22, 2018, 02:13:11 pm »
You could use a computer with vga out and set the video mode in dos to 640 x 480 plugged into your monitor. This way you can snoop the lines to look for a difference between the computer vga and your vga. RBG lines are terminated with resistors in the monitor much like a coax cable is terminated to stop data from bouncing back and forth.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: testing homebrew vga controller
« Reply #4 on: January 22, 2018, 03:31:40 pm »
It may turn out that the vertical and horizontal blanking intervals actually have to be blanked.  These are what those retrace intervals are actually called.

If you check out the code here, near bottom of page, you will see that R,G & B are only emitted when the 'beam' is in the active area:

http://www.fpga4fun.com/PongGame.html

Code: [Select]
reg vga_R, vga_G, vga_B;
always @(posedge clk)
begin
  vga_R <= R & inDisplayArea;
  vga_G <= G & inDisplayArea;
  vga_B <= B & inDisplayArea;
end
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: testing homebrew vga controller
« Reply #5 on: January 22, 2018, 04:52:59 pm »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: testing homebrew vga controller
« Reply #6 on: January 22, 2018, 11:35:57 pm »
The signals are parallel terminated into 75 ohms at the monitor so if you use series termination at your driver, signal levels are halved.

As I recall, the green channel contains the sync pulses as well and can be used with TV sync triggering on an oscilloscope or to drive a monochrome display in place of a composite signal but I am just going by memory.  You might take a look at the output of a VGA card using an oscilloscope to verify what is suppose to be happening.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: testing homebrew vga controller
« Reply #7 on: January 22, 2018, 11:46:38 pm »
Try connecting the color signals to something other than a DC voltage. If you're doing this with an FPGA it's trivial to "wire" up a counter or some such to feed a square wave to any of the color signals. You'll end up with vertical lines, checkerboard or other various patterns depending on what you do.
 

Offline Dan MoosTopic starter

  • Frequent Contributor
  • **
  • Posts: 357
  • Country: us
Re: testing homebrew vga controller
« Reply #8 on: January 23, 2018, 01:12:32 am »
Ok, instead of a DC signal, I sent the output from various counters in my pulse circuitry. Now I get some vertical lines of various spacing/width commensurate with the the speed and width of the pulse.

The image is always stable, perfectly vertical lines of the proper color.

I consider this progress of a sort, although I'm still not clear why a continuous DC signal would fail.

I'm next going to set up the proper flip-flops to have the signal only be active at the appropriate time. When I sent the pulses at the full 25.175 MHz, I still don't have a perfectly solid color displayed, but vertical stripes.

I have compared my sync signals to other VGA outputs, and it compares favorably. My scope measurements say my numbers are pretty much spot on.

I'll keep you guys posted!

Sent from my E6830 using Tapatalk

 

Offline helius

  • Super Contributor
  • ***
  • Posts: 3639
  • Country: us
Re: testing homebrew vga controller
« Reply #9 on: January 23, 2018, 01:40:59 am »
I consider this progress of a sort, although I'm still not clear why a continuous DC signal would fail.
Because if the monitor responded to signals down to DC, it would couple line-frequency interference (since that is within the passband that goes all the way down to DC). That would mess up the picture. So the video signals are high-pass filtered, and their DC component is "restored" to 0 by the DC Restorer circuit. You can even put capacitors inline on video cables to make them appear brighter (in effect, further high-pass filtering them).
 

Offline Dan MoosTopic starter

  • Frequent Contributor
  • **
  • Posts: 357
  • Country: us
Re: testing homebrew vga controller
« Reply #10 on: January 23, 2018, 02:04:00 am »
I consider this progress of a sort, although I'm still not clear why a continuous DC signal would fail.
Because if the monitor responded to signals down to DC, it would couple line-frequency interference (since that is within the passband that goes all the way down to DC). That would mess up the picture. So the video signals are high-pass filtered, and their DC component is "restored" to 0 by the DC Restorer circuit. You can even put capacitors inline on video cables to make them appear brighter (in effect, further high-pass filtering them).
Ok, that makes perfect sense!

The thing is, I have found suprisingly little info on how to to any of this. I've found the timing standards, and the VGA pinouts online, but nothing on the analog aspects of the color channels.

What is really like to find is a good block diagram of what the analog circuitry on the monitor end looks like where the signals are sent.



Sent from my E6830 using Tapatalk

 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8263
Re: testing homebrew vga controller
« Reply #11 on: January 23, 2018, 02:53:45 am »
You can find a VGA monitor schematic if you're interesting in that.

I may also recommend, for VGA fun, having a look at https://www.linusakesson.net/scene/craft/
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: testing homebrew vga controller
« Reply #12 on: January 23, 2018, 04:15:44 am »

The thing is, I have found suprisingly little info on how to to any of this. I've found the timing standards, and the VGA pinouts online, but nothing on the analog aspects of the color channels.

What is really like to find is a good block diagram of what the analog circuitry on the monitor end looks like where the signals are sent.


All you need to know is that the voltage should be 0V (blank) .. 0.7V (full on) for the color channels and 0V .. 3.3V (up to 5V) for the synch channels and the monitor input is terminated with 75 Ohms to ground.
That implies you want to be in the region of 75 Ohms of driver impedance for the color channels and whatever for the sync channels.

http://forums.parallax.com/discussion/167581/sanity-check-on-r-2r-vga-dac  -- see the right hand 'correct impedance' circuit.
http://www.javiervalcarce.eu/html/vga-signal-format-timming-specs-en.html

The sanity-check page is all about a 6 bit color but you can find all types of VGA DACs on the Internet.

 

Offline nali

  • Frequent Contributor
  • **
  • Posts: 657
  • Country: gb
Re: testing homebrew vga controller
« Reply #13 on: January 23, 2018, 01:07:47 pm »
The thing is, I have found suprisingly little info on how to to any of this. I've found the timing standards, and the VGA pinouts online, but nothing on the analog aspects of the color channels.

What is really like to find is a good block diagram of what the analog circuitry on the monitor end looks like where the signals are sent.

Look for "DC Clamping". If you Google "Video DC clamping" you'll get a bunch of app notes from a few of the major semiconductor manufacturers.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf