LVDS to Analog RGB converter? - Page 1
Forum section: electronics / projects

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 02:37:35 pm
content: Greetings.I've been daydreaming lately about using an embedded Linux board (or something) with native LVDS output that can drive an arcade monitor. Many of you will already know exactly what I'm after from that single sentence.I hope to develop an embedded arcade emulation system for my own purposes. It won't be something I sell or give away, just for my own amusement after the challenge of getting it running.The problem though is that I don't know what I'm looking for as far as LVDS->Analog RGB goes, or even if I need to use LVDS. If I need a chip/board, I don't know enough to know what specs I need to look for.I have patience and skill enough to muddle my way through implementation if I ever find the device I'm looking for, I'm sure. I work with many EEs who could likely assist as well, and while none of them have any interest in arcade stuff, if I come to them with a specific implementation issue they've said they would find it hard to resist helping.I need to output R + G + B + HSync + VSync. I know enough to combine and invert the sync if necessary for whatever monitor I wind up implementing on. Maybe GPIO alone is enough to do this, I don't know. Arcade monitors have a hsync of 15kHz, and the RGB signals are (I think) 0-2v or 0-5v depending on the monitor, though most can handle either. I haven't the equipment to measure this properly from my own hardware.Some guidance on where to start reading would be most welcome. I honestly don't plan to implement anytime soon, I'm still at the beginnings of research, but this is a topic I want to learn more about. Any help at all would be appreciated. If this can be done with GPIO, then it is somewhat likely that I'll be able to simply work up a software solution, but if an LVDS -> Analog RGB device is required, I'd love help on choosing the proper device.Thanks for any and all help.

author: peter.mitchell
author_rank: Super Contributor
timestamp: July 08, 2013, 02:52:12 pm
content: My immediate thought would be to find a lvds -> dvi-d converter, unsure of how complicated that would be, but i know lvds and dvi-d are quite similar. From there, just use an off the shelf active dvi-d to vga converter... maybe...

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: July 08, 2013, 02:57:55 pm
content: There are LVDS receiver chips (e.g. from TI) which will give parallel RGB out. You can then feed this into an RGB DAC. (or use reistors if you're not too bothered about lots of colours)

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 03:00:57 pm
content: Quote from: peter.mitchell on July 08, 2013, 02:52:12 pmI thought that, too, and if that were to work I could just use the HDMI out and run that into a VGA converter. I researched it for a bit, but I'm unable to find any that can drive the VGA port at arcade monitor frequencies. This is a very odd requirement, looks like.Honestly I don't care what method the digital signal gets into whatever converts it to 15kHz analog RGB, but it seems that finding something that can actually drive an arcade monitor is the issue so far. There must be something, though, because although monitors of this resolution are no longer made, this resolution is still used and parts to drive the monitors are still made. One can still purchase arcade boards which output this signal, though I'm not sure how they do it.Is it possible that an FPGA could do this? I looked at my 60-in-1 board and it appears that one of the two chips that are doing all the work is an FPGA, but I'm not sure.

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 03:02:52 pm
content: Quote from: mikeselectricstuff on July 08, 2013, 02:57:55 pmAh, dude I love your youtube channel. I just discovered it yesterday. Brilliant stuff.What is the nature of the parallel RGB out? Can I get those LVDS receiver chips to output the proper sync or is there a separate IC for that? I'll do more googling and see what I can find.Thank you.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: July 08, 2013, 03:16:23 pm
content: Quote from: Rigby on July 08, 2013, 03:02:52 pmSomething like thishttp://www.ti.com/product/sn75lvds86(picked at random - may be better choices)You get a pixel clock, 6 to 8 bits of parallel data per R,G,B, as well as hsync, vsync and data-enable.remember LVDS is just a dumb serialiser of the original generated parallel RGB data

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 03:32:26 pm
content: Quote from: mikeselectricstuff on July 08, 2013, 03:16:23 pmAh, excellent. I found something else but it was clearly not the correct part.Thank you.The video resolution that is pushed out via LVDS will be the same that is output by this receiver, right? Need to make sure the graphic mode(s) I want are supported by the GPU on whatever board I purchase.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: July 08, 2013, 04:24:03 pm
content: QuoteThat may be a problem - you need to be able to output a line rate that low. The LVDS stuff may cope, but you may need to do some fudging to get a pixel clock fast enough for the LVDS PLL to work, e.g. you may need to generate a frame with a very high holrizontal resolution to compensate for the low vertical resoution just to get the pixel clock high enough.QuoteYou _will_ need a scope to do this

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 05:02:32 pm
content: Quote from: mikeselectricstuff on July 08, 2013, 04:24:03 pmYeah this is a weird set of requirements, which is probably why there is only one example of a similarly working product that I can find, and it's really dodgy. It converts VGA or component YUV to 15kHz "CGA" but it can't seem to get it right well enough that it's actually a quality product and it's analog which means it requires fiddly tuning to look good, if it can be made to look good at all.A scope is not in the budget for a while, so I'll have to keep on wishing, and buy this chinese thing and see how well it works.

author: Rasz
author_rank: Super Contributor
timestamp: July 08, 2013, 05:19:36 pm
content: Quote from: Rigby on July 08, 2013, 03:00:57 pmall LVDS to Analog RGB or dvi-d and rgb converting chips only do signal voltages/levels/electrical standard, They dont touch frequencies.What you want is something converting 31KHz to 15KHz or 15KHz capable source.Rasppi wont do 15KHz because it is broadcom = no open source = all in evil binary blobBeaglebone has a fully programable display engine and its possible you could make it do 15KHz (beagle XM with DaVinci has no problem with 15khz)that cga thingamajig captures full frames and converts same way LCD monitor would upconvert VGA signal to its native 1080 resolution.Im sure you sawhttp://hackaday.com/2012/12/17/using-arcade-monitors-with-the-raspberry-pi/

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 05:30:29 pm
content: I did. That's gonna be how I do it in the short term I suppose.The difficulty will be finding an embedded platform that can run modern emulation software AND render it in real-time with software alone, AND that can output a digital signal of 15kHz, which I can then convert to analog and send to the screen. If I could do it via GPIO that would be nice, but that seems CPU-heavy to me. Developing a virtual frambuffer device that interfaces with hardware GPIO is also out of my skillset.I don't like the D->A->D->A process that is required with this type of approach, but it's what I'll have to use, looks like. Seems like this will add at least 2 frames (1/30th of a second!) of latency. Cripes, realizing the latency will be so high makes me want to not do it at all, now.

author: jebcom
author_rank: Regular Contributor
timestamp: July 08, 2013, 06:55:45 pm
content: It seems like you have a specific arcade monitor that you want to stick with.You mention 15 kHz, so is this basic NTSC interlaced video?What is your reason for wanting to use an LVDS interface? I think this will make things more difficult.QuoteThis indicates that your display has component video interface with separate sync. Why not choose an embedded board with built-in VGA? You'll have to check with the board vendor to see if it actually supports this low of video rate out the VGA connector. The physical interface can handle it; it's a matter of whether the system and drivers support it.Also, the 2V (and especially 5V) might be a challenge for many video outputs, so you should verify this. Around 1V is more typical for modern VGA and component video outputs.

author: lgbeno
author_rank: Frequent Contributor
timestamp: July 08, 2013, 07:11:24 pm
content: I've seen chips from a company called chrontel do this function, they are difficult to get a hold of though since chrontel focuses on pcb motherboards and things like that.

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 07:20:29 pm
content: Quote from: jebcom on July 08, 2013, 06:55:45 pmI want to drive an arcade monitor, not NTSC or PAL (or SECAM). They are considered "CGA" monitors, but that is a very loose term. The 15kHz variety can do about 640x240, but actual resolutions used differ wildly. Usual resolutions are 288x224 or 256x240, though as stated they vary quite a bit. Arcade monitors are not interlaced at this Hfreq, but higher-end monitors are. The tri-sync monitors are CGA+EGA+VGA monitors and can handle up to about 1024x768 resolution natively.Regular TV tubes and yokes are usually used for the CGA variety since they are of the exact same construction as arcade monitors and yokes, but obviously, the electronic chassis that drives the tube differs somewhat from a TV chassis because the resolution, and refresh rate vary depending on game, and CGA monitors are not interlaced.I want to use an arcade monitor because those old arcade games look so much better on CRTs that display the proper video modes. Even using a TV leaves a lot to be desired. NTSC crawlies are very unsightly, and there are a lot of very straight lines in old arcade games.Arcade monitors (the very old ones) are 5V. Modern ones accept anything from 1V to 5V. I mentioned the separated sync because, depending on the chassis, arcade monitors can need positive or negative, separated or combined sync. If I have separate sync I can use TTL logic to combine or invert and arrive at whatever is necessary. That said, nearly all arcade monitors require negative combined sync.(Sorry for all the modifications. I try to reply and miss a question until I reread your reply. This should be the last one.)I asked about LVDS, because LVDS is available directly from the video chip on a lot of embedded devices, and I want to keep a digital path for as long as possible until it reaches the previously mentioned display hardware. HDMI would be just as acceptable if I can get audio from elsewhere, the digital variant of DVI would be acceptable also. Heck, even VGA would work if I could get a proper signal out of it, but I'm not sure that modern chipsets even support resolutions like 320x240@60 progressive frames per second.

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 08:06:31 pm
content: Quote from: lgbeno on July 08, 2013, 07:11:24 pmhttp://www.chrontel.com/index.php/products/display-interface/where/output-standards/analog-rgb---plus--csyncYup. Exactly what I need. I should probably learn how to determine what supporting circuitry is required. I should also maybe buy a soldering iron and learn to fab one-off PCBs... Putting the cart before the horse here, I guess.

author: Mike Warren
author_rank: Unknown
timestamp: July 08, 2013, 10:15:43 pm
content: A lot of the old arcade games used Amiga computers that fed a PAL or NTSC compatible RGB signal. The timing was PAL (NTSC) but instead of encoding the chroma on a single signal, the RGB were kept separate.I don't know how you would do that with current technology.Wouldn't it be easier and cheaper just to fit a modern DVI monitor?

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 10:30:26 pm
content: Quote from: Mike Warren on July 08, 2013, 10:15:43 pmYes, of course. But I already own a lot of arcade monitors, they all work, and they all look great (far better than any LCD, for arcade games.)Putting an LCD on a Ms. Pacman machine (for example) is something like watching VHS tapes you recorded as a child on a 55 inch plasma. A VHS cassette will always look best (as good as they CAN look) on an SD tube TV.In the arcade community, LCDs are considered very bad form. Tube computer monitors even moreso. One should always strive to play arcade games on arcade monitors whenever possible. It's getting harder and harder these days, but arcade monitors and donor TV tubes are still readily available.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: July 08, 2013, 11:14:04 pm
content: This is something that wouldn't be too hard to do with an FPGA - e.g. Spartan 6 which can do DVI receive (there s example code out there to do the fiddly bits for that part).You could probably scan-convert/rescale on a line-by-line basis with the internal RAM, and if driving a CGA type monitor you wouldn't need the DAC.

author: Mike Warren
author_rank: Unknown
timestamp: July 08, 2013, 11:19:09 pm
content: There are converters available from VGA or DVI to PAL or NTSC. I've never looked inside one, but the encoding to PAL may be done in a separate chip in which case the RGB might be available inside.Just a thought.

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 11:56:38 pm
content: Quote from: mikeselectricstuff on July 08, 2013, 11:14:04 pmI agree with you, and I think this is how the most modern board I have does it. Now that I'm home I can take pictures and verify that it's an FPGA before I spout off here and embarass myself further. The board has what appears to be an Intel main CPU, an Altera Max II, which I'm assuming is for the video signal generation, some flash, some RAM maybe, and some analog stuff which I think is for audio amplification. The audio amp stuff is kind of a gimme actually; there's a volume pot on the board.Altera Max II:Intel PXA255 CPU:

author: Rigby
author_rank: Super Contributor
timestamp: July 08, 2013, 11:58:45 pm
content: Quote from: Mike Warren on July 08, 2013, 11:19:09 pmYou're right, but if I do this I would preferably find a solution that doesn't buffer a frame, rescale it, then send it out. If I can find a chip/board that outputs the correct resolution and timings, then I can just change the signal format and whatever is necessary to make that an analog RGB signal suitable for arcade monitors. The FPGA approach seems to be the most promising at this point, but I know little and I talk a better game than I play.

author: Psi
author_rank: Super Contributor
timestamp: July 09, 2013, 12:38:01 am
content: I've only skim read parts of this thread, but could you drop the arcade monitor and use a normal CRT with some tweaks to the video driver so it generates for example.. two pixels where one is required and offsets the start by x pixels.The goal being to display your unusual resolutions natively by figuring out a ratio to a typical CRT resolution and maybe dropping screen real-estate on the sides if needed to get a whole number ratio.

author: Rigby
author_rank: Super Contributor
timestamp: July 09, 2013, 01:23:50 am
content: Quote from: Psi on July 09, 2013, 12:38:01 amI understand what you're saying, use a TV rather than an arcade monitor and get on with my life.Even with pixel doubling the interlacing will always be there, unless i simply fail to draw every other field entirely. The 640x240 resolution is a maximum, not the norm. Normal arcade resolutions display PERFECTLY on TV CRTs but only if those CRTs are being driven by an arcade monitor chassis.

author: jebcom
author_rank: Regular Contributor
timestamp: July 09, 2013, 04:35:15 am
content: QuoteHa ha, yes, I understand. Actually I was just referring to the timing used by NTSC, not the whole composite video thing, but I didn't make that clear. But I understand what you're saying.I would still spend a bit of time checking on analog video (likely called VGA) interfaces of existing embedded boards. That would be by far the easiest if one exists that can be coaxed into producing that timing.One problem with DVI will be it's minimum pixel clock of 25 MHz; your interface is most certainly less than this. I don't know if there's a minimum on LVDS, but a lot of the current applications are for notebooks with much higher pixel clock than you are using. You can use a pixel-doubling or quadrupling scheme to fit in enough pixels to get to the pixel clock that you need for the transmission lines. But this would still take some logic at the receiving end to take the pixels that you need. And you would still need to create that timing format at the transmit end. You might be able to get a DVI receiver chip that will make the video data available for you to convert however you want. But you still need to maintain signal integrity up to the chip, and that probably means a careful layout.

author: Rasz
author_rank: Super Contributor
timestamp: July 09, 2013, 05:25:58 am
content: Quote from: Rigby on July 08, 2013, 08:06:31 pmno, like I said this converts voltages, not frequenciesQuote from: Rigby on July 08, 2013, 11:58:45 pmBeagle XM does this, most likely also Beaglebone black, and at $45 its a no brainer to try it,. It will run all arcade emulators no problem

author: WarSim
author_rank: Frequent Contributor
timestamp: July 09, 2013, 08:18:56 am
content: After contemplating if I should say something I decided to offer this.Equivalent power in the old arcade systems is on a uControler now. Hard isn't required.What you are calling an arcade monitor are just CRTs with a tighter mesh. CRTs are not frequency limited, the yoke is to an extent.Only thing that changes is how you give the information, few had encoder of any kind certainly not NTSC or PAL.Some times a wide format picture would be used just flipped vertically, and most people couldn't even tell.If you want authentic think old school methods and thing may just fall into place.As far as lag and buffering, the originals had such delays.Mrs Packman used sprite blittering so it had three screen buffers static,dynamic and blitter. If you ever saw an original look at the edges of the ghost and mrs Pacman's bow. That is the evidence of this process. So add 1/16 second for this.The control inputs where also debounced with timers and maintainer adjustable. It was common to have 1/10 second debounce.If you are going for authentic buffers is the way it was done. If you are looking modern and realtime yes you may very well be looking at big FPGA or faster options.Of course is your project I have only offered, the past methods.

author: Rigby
author_rank: Super Contributor
timestamp: July 09, 2013, 12:18:25 pm
content: Quote from: Rasz on July 09, 2013, 05:25:58 amI don't think the BBB does this; it has a very limited set of resolutions due to the selected GPU, and the XM is too costly for me to purchase without knowing exactly what I'm getting into.Here's the thing: I'm not smart enough or educated enough to make this happen. I don't have the money to make this happen, my marriage is falling apart, my children are growing old enough that I'm no longer as interesting to spend time with, and I have an electronics hobby that is so rare that even communicating my needs effectively on an electronics forum is difficult.I see little choice anymore. I'm giving up on this. There isn't enough combined will in the world to design, test, manufacture and sell an embedded platform with a JAMMA edge connector, or even to build a JAMMA edge addon card/cape/backpack/shield/daughterboard for any existing platform.

author: Rasz
author_rank: Super Contributor
timestamp: July 09, 2013, 07:57:42 pm
content: Quote from: Rigby on July 09, 2013, 12:18:25 pmits the same LCD controller IPlcd controllers dont have resolutions, they have timings and rulesets for sync pulses

author: amyk
author_rank: Super Contributor
timestamp: July 09, 2013, 09:10:09 pm
content: Quote from: Rigby on July 08, 2013, 07:20:29 pmYou mean like Mode X? Any standard VGA will support that in BIOS; other resolutions/refresh rates are possible on almost all modern video cards (including integrated ones), as long as the dot clock is within limits. It's just a matter of programming the CRTC with the desired timings. VGA-out is available on a lot of embedded boards.

author: WarSim
author_rank: Frequent Contributor
timestamp: July 09, 2013, 10:08:17 pm
content: Program the CRTC?Are you suggesting the encoder is now part of a CRTC now.

author: Rigby
author_rank: Super Contributor
timestamp: July 10, 2013, 01:57:05 am
content: Quote from: amyk on July 09, 2013, 09:10:09 pmproper signalling out of a PC video card is nearly trivial, if you have the proper chipset. There are embedded devices which can do it, but I don't know enough to attempt it even if I do purchase one, nor do I know for certain which devices can do this and which cannot. More research is required.I want to attempt to create a daughter card or cape, shield, whatever the board I use calls it, that provides aJAMMA connectorand can output video and sound, and accept joystick & button input from an arcade cabinet via this connector. The input is digital mostly in that it is not analog; button presses and joystick movement is simply shorting the proper input pin to ground. I'm not even sure what this type of input is called.

author: Rigby
author_rank: Super Contributor
timestamp: July 16, 2013, 11:29:32 am
content: Found this today. Perhaps this is something I should focus on.http://www.fpgaarcade.com/If I can learn how to describe the arcade hardware to an FPGA then it would seem that I will have a new uncle named Bob.