Author Topic: Turning these video signals into VGA  (Read 32077 times)

0 Members and 2 Guests are viewing this topic.

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Turning these video signals into VGA
« on: January 26, 2016, 03:07:43 am »
Hi!

I'm trying to convert an old HP 1662AS Logic Analyzer/Oscilloscope from CRT display to an LCD display. The video connection to the CRT module has HSYNC, VSYNC and Video channels (service manual http://www.doe.carleton.ca/~nagui/labequip/la/1663C%20Service%20Guide.pdf).

I made measurements of the signals which can be seen here: https://keepdevelopingprojects.wordpress.com/2016/01/25/project-crt-oscilloscope-lcd-mod-motivation/. No need to read, you can just look at the screen shots.

My plan was to use an FPGA/fast(~70MHz) microcontroller to read the current video signals and then output VGA signals. However, I was wondering if anyone could see an easier way to do this?
Could I just change the voltage levels and do some buffering and then send it straight to a VGA display? I know that VGA normally has a 31.469kHz horizontal frequency whereas these signals have a 25kHz horizontal frequency, so I guess not.
Any insights would be great.

Matt
Read about my stuff at: projects.matthollands.com
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
Re: Turning these video signals into VGA
« Reply #1 on: January 26, 2016, 03:12:17 am »
I believe you can buy off the shelf small converters from composite to HDMI or to RGB.
But why wouldn't you simply get an LCD display that accepts composite and just eliminate the need for any kind of converter?
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Turning these video signals into VGA
« Reply #2 on: January 26, 2016, 03:21:00 am »
Is this a composite signal? If it was, then wouldn't it only have one line? Instead of HSYNC, VSYNC and Video...
Read about my stuff at: projects.matthollands.com
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
Re: Turning these video signals into VGA
« Reply #3 on: January 26, 2016, 03:23:04 am »
It is essentially trivial to insert the H-sync and V-sync into the video signal to create "composite".
It could be as easy as a couple of 5-cent resistors.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13905
Re: Turning these video signals into VGA
« Reply #4 on: January 26, 2016, 03:42:47 am »
Some arcade games used to use a 25KHz scanrate.  There are a few off-the-shelf VGA converters than can handle it, and if you are lucky, you will find one that's plug in & go with the signals you have.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #5 on: January 26, 2016, 04:35:34 am »
Silly question, did you try to feed the HSync, VSync and the video to for example the red channel of a VGA monitor? (Edit: don't do that, just read it and saw you have 3.5V on your video signal, so you need to adjust that to not exceed 0.7V)

As long as the HSync and VSync are at TTL/CMOS levels (5V or 3.3V) and your video is within the 0-0.7V it should be fine for the monitor, other than it might not support it and it wont lock to the signal.
Edit: for what I read you are getting 3.5V on the video signal. So maybe not plug it directly you have to bring down that video signal to 0.7V max.

Edit2: but it's unclear, you have your probes set to 10x so does that mean your video signal is from 0 to 0.35V? the scope captures show 1.25V or so with 10X so 0.125V so that's not clear, because they are pretty zoomed out.

Your timings seem to match 1/3 of this resolution on the vertical:

http://tinyvga.com/vga-timing/1600x1200@60Hz

If you divide the Horizontal timings by 3 as well that would be an 18MHz pixel clock (~55.56ns per pixel)

I was doing a project driving a VGA screen with an MCU, I can play with plugin in those values and see if my VGA LCD panel locks to something like 533x400(visible 720x417 total including the front, back and pulse signals) which seems it will match your timings (other than the sync pulses are positive while yours are negative, but I can change those on my module as well).
For example these are the values I used for 800x600@60Hz

using the values in here: http://tinyvga.com/vga-timing/800x600@60Hz

More info on my project here:
https://www.eevblog.com/forum/projects/no-bitbanging-necessary-or-how-to-drive-a-vga-monitor-on-a-psoc-5lp-programmabl/

I'll test it and report back to see if it locks.
« Last Edit: January 26, 2016, 04:56:15 am by miguelvp »
 

Online Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3682
  • Country: ca
  • Place text here.
Re: Turning these video signals into VGA
« Reply #6 on: January 26, 2016, 04:40:12 am »
Green is the traditional combined sync channel.
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Turning these video signals into VGA
« Reply #7 on: January 26, 2016, 05:16:31 am »
@Richard Crowley
Oh I see, that's a good idea. Ideally I would want the signal in VGA format, but I'll bare that approach in mind.

@miguelvp
That is very interesting. Those timing specs are indeed 3 times what I have. The difference is that the datasheet specifies 500 horizontal points which would give a pixel clock of approx 17.2Mhz.
Of course I could simply invert the HSYNC and VSYNC pulses if necessary.
Read about my stuff at: projects.matthollands.com
 

Offline johnwa

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: au
    • loopgain.net - a few of my projects
Re: Turning these video signals into VGA
« Reply #8 on: January 26, 2016, 05:40:21 am »
Silly question, did you try to feed the HSync, VSync and the video to for example the red channel of a VGA monitor? (Edit: don't do that, just read it and saw you have 3.5V on your video signal, so you need to adjust that to not exceed 0.7V)


Yes, the OP basically has an analogue video signal with a 25kHz horizontal scan rate. Pretty much any monitor should be capable of displaying it fairly easily, provided that it can sync that low. Old CRT monitors sometimes had the sync range specified in the manual; something like 30-66kHz might be typical. LCD monitors have less technical constraints than CRTs, but are usually still made to only accept a certain range - some may be more forgiving than others.

I once had to fix a machine tool control with a failed monitor. It appeared to have a dead tube, and there was a long lead time on a replacement. I can't remember the horizontal sync frequency, but it would have been CGA or EGA (15 or 22kHz). After trying almost every LCD monitor in the office, I eventually found one that would lock to the signal, which got the machine up and running again until we could get a proper replacement. So, it appears that at least some LCD monitors will handle these low sync frequencies.

 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Turning these video signals into VGA
« Reply #9 on: January 26, 2016, 05:41:25 am »
Actually, the datasheet says

Quote
Waveform Display
Displayed Waveforms Eight waveform windows maximum, with scrolling across 96
waveforms.
Display Formats Waveforms can be displayed in an overlapping and/or
non-overlapping format. Display capability of A-B and A+B is
also provided.
Display Resolution 500 points horizontal, 240 points vertical.

I originally took that to mean that the whole display way 500x240, but actually it looks like just the Waveform region is 500x240. It looks to me like there are more like 400 lines. So maybe we are looking at 533x400 like you say :)
Read about my stuff at: projects.matthollands.com
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #10 on: January 26, 2016, 05:44:46 am »
Well I did plugged in the following values



and on the scope it looks good.
I did trigger on Ext with the VSync and display HSync on Chan 1 and Red on Chan 2


But the display says it's out of range so no joy.


Green is the traditional combined sync channel.
I know, I'm not trying to combine the composite sync into the green channel, the OP has access to the HSync and VSync so no need to do that.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #11 on: January 26, 2016, 05:50:00 am »
Actually, the datasheet says

Quote
Waveform Display
Displayed Waveforms Eight waveform windows maximum, with scrolling across 96
waveforms.
Display Formats Waveforms can be displayed in an overlapping and/or
non-overlapping format. Display capability of A-B and A+B is
also provided.
Display Resolution 500 points horizontal, 240 points vertical.

I originally took that to mean that the whole display way 500x240, but actually it looks like just the Waveform region is 500x240. It looks to me like there are more like 400 lines. So maybe we are looking at 533x400 like you say :)

Video displays are usually, actually always, divisible by 8 on both directions. Maybe it's 536 visible. I'll play with the numbers a bit.
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Turning these video signals into VGA
« Reply #12 on: January 26, 2016, 05:53:29 am »
I know originally I stated that the voltages were between 0-350mv (on 10:1 probes uncompensated). I think I must've been reading off of the wrong scale which is embarrassing. I've just checked and the voltage varies between 0 and 1.298V on a 1:1 probe.
Read about my stuff at: projects.matthollands.com
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #13 on: January 26, 2016, 06:06:45 am »
Since the horizontal timing is really 720 clock pixels, could it be that it's displaying 640x400?

is there anyway you could show the scope traces for a single scan line? with the Hsync so we can see the front porch, back porch and pulse in relation to the displayed pixels?

and also add a close up picture of the screen, that might help.

Edit: maybe if you could manage to get a screen capture into the floppy disc? I'll look to see if google can help on that as well.
« Last Edit: January 26, 2016, 06:35:56 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #14 on: January 26, 2016, 06:22:16 am »
I know originally I stated that the voltages were between 0-350mv (on 10:1 probes uncompensated). I think I must've been reading off of the wrong scale which is embarrassing. I've just checked and the voltage varies between 0 and 1.298V on a 1:1 probe.

Maybe start with just hooking up the HSync and VSync If they are below 5V to a VGA monitor and see if it locks (with no video fed to it)
From my findings it seems the monitor controllers don't actually care if the pulses are positive or negative. I think they simplified things and just care about the pulse and not the polarity of the standard.
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Turning these video signals into VGA
« Reply #15 on: January 26, 2016, 06:53:33 am »
Ok here is a picture of one line and also of the whole display. I think if you zoom in you can resolve the lines. I counted a few lines and extrapolated (using a tape measure!) and got around 390 lines, so 400 is easily within error margins.

I don't think I have much chance of getting a floppy disk quickly.
Read about my stuff at: projects.matthollands.com
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #16 on: January 26, 2016, 04:10:41 pm »
I ran out of time last night.

I'll analyze the picture after work today.

Edit: looks like it's a line going across the Analyzer/Configuration Print/Run buttons.

Huge horizontal Back Porch compared to your average video format.
« Last Edit: January 26, 2016, 04:24:51 pm by miguelvp »
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Turning these video signals into VGA
« Reply #17 on: January 27, 2016, 06:39:57 am »
I'm going to try and track down a VGA display to test the HSYNC/VSYNC signals to see if it locks on.
Read about my stuff at: projects.matthollands.com
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #18 on: January 27, 2016, 06:51:11 am »
Sorry I'm still trying to analyze the image to get the pixel clock and the horizontal timings based on your scope captures, but with the aliasing on the scope image it's hard to do.

My hope was to reproduce your video signal and see that it locks on my displays.

Maybe even if it doesn't lock it might be as simple as in changing the horizontal back porch and the amplitude of the video signal by dividing it by two.

 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Turning these video signals into VGA
« Reply #19 on: January 27, 2016, 07:04:14 am »
No worries at all, thank you so much for your help so far.

I understand how you could change the video signal amplitude, but how would you change the back porch?
Would you insert an FPGA/uC in the signal path and effectively buffer the signals to stretch the visible region over a larger region of the horizontal period?
Read about my stuff at: projects.matthollands.com
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #20 on: January 27, 2016, 07:43:09 am »
No worries at all, thank you so much for your help so far.

I understand how you could change the video signal amplitude, but how would you change the back porch?
Would you insert an FPGA/uC in the signal path and effectively buffer the signals to stretch the visible region over a larger region of the horizontal period?

Yes, you could do a PLL to sync the HSync with the MCU/FPGA/CPLD and force the back porch to be smaller or in other words trim it, if that helps sync with what a VGA controller can sync to, therefore extending what the visible region is but clamped to 0V.

Might not be that simple but the alternative is to capture the analog signal and do an upconversion to VGA, that would be more costly.

Then again as johnwa mentioned, he did find and LCD monitor that will lock to lower frequency sync signals.

 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Turning these video signals into VGA
« Reply #21 on: January 28, 2016, 04:06:59 am »
Ok, managed to get hold of a VGA monitor and test with it (Just HSYNC, VSYNC and GND). When I turn on the CRT the message changes from "Cable not connected" to "Input not supported", which suggests that it is detecting something but is not happy with the signal, I assume the 25kHz part.

Looks like I'm going to have to include some kind of buffer in the middle to change the clock...

Would you expect something like a Teensy 3.2 running at 72MHz to be able to handle this? Or should I look to an FPGA or similar?
Read about my stuff at: projects.matthollands.com
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #22 on: January 28, 2016, 05:29:29 am »
The problem will be buffering the analog data, that will require a video ADC and a DAC to drive it at a different frequency.

Sorry I didn't have time to deconstruct your signal yet. Been very busy the last two days.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Turning these video signals into VGA
« Reply #23 on: January 28, 2016, 07:36:07 am »
So I took your image and tried to figure out the resolution, I'm getting some weird values

Horiz
front 16
sync 46
back 104
vis 416
(total 582)
pixel clock 14,550,000 Hz

The closer I can get my pixel clock is 14.5 MHz



Still out of range but I can play now with the horizontal back porch but I doubt is going to lock.
here is compared to your signal.


There is also another possibility, getting one of those retro gaming upscalers but not sure if they will work with your setup and resolution.
http://www.amazon.com/gp/product/B00988GMLG

They can convert 15KHz signals to HDMI but not sure if it could upscale your signal. Also I don't know what they have inside and if you could change and program it, plus you will have to feed your video signal converted to SCART levels to all three RGB inputs.

Is there a possibility you could take a scope capture of the VSync with respect of the HSync so I can fine try to replicate the vertical front,back porch and pulse?

Edit, each of the dashes is really every three pixels, I did the same with the Image33.jpg to count the pixels, but it's too big on resolution to embed in the post.


« Last Edit: January 28, 2016, 08:04:56 am by miguelvp »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13905
Re: Turning these video signals into VGA
« Reply #24 on: January 28, 2016, 08:06:58 am »
Wrong upscaler.  The retro arcade machine community has upscalers that can handle their medium rez. (25KHz Hscan, 60Hz Vscan) consoles.  Google: 25KHz JAMMA converter VGA If you can find the 3 bit digital signal responsible for those brightness levels, you could remap it into RGB and tweak the pallete to your own tastes.    I'm thinking a fast 3 to 8 line decoder driving analog switches to select from a bank of 24 presets to provide an analog RGB colour to replace each brightness level.   

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf