VGA to LCD converter circuit help - Page 1
Forum section: electronics / projects

author: ermay12
author_rank: Newbie
timestamp: June 01, 2015, 05:55:36 pm
content: Hello all, this is my first post and I was hoping you could help me.I have acquired a broken laptop and salvaged the LCD display from it. As a design challenge, I am attempting to design an adapter for my computer's VGA port to the LCD. I am here asking if my plan can work or if it is inherently backwards. I am new to both VGA hardware as well as LCD technology and was hoping I could get the advice of somebody who better understands the technology.The data sheet for the monitor is found here.http://www.datasheet4u.com/datasheet/L/P/1/LP156WH2-TLQB_LG.pdf.htmlFocusing only on the pixel data, I understand that the VGA port will supply 3 analog signals of rgb data, a v-sync, and an h-sync.According to the tech sheet, the monitor needs 3 lvds data signals, and an lvds clock. The data lines transmit the color data serially completing a full pixel of data every clock cycle. This means that each data pin transmits 7 bits of data per clock cycle. The data lines transmit 6 bits per color, v-sync, h-sync, and data enable.The plan is to build a circuit that first converts the analog color data to 6 bit color data. This data will then be fed into three multiplexors that are controlled by a clock (7 times the frequency of the suggested clock for the monitor). The output of these mux's will go to the 3 data pins of the lcd after first being converted to an lvds signal. A fourth mux will be used to control the lcd's clock which will be 1/7th the frequency of the clock used for the data signals.Attached is a schematic for this part of the circuit.My questions are as follows:Is this circuit logical?Will the computer adjust the rate of data transmission because of the EDID from the monitor, or do I have to manually tell it how fast the pixel clock is?Can the VGA port handle the resolution of this monitor?Is the EDID of the VGA pin out compatible with the EDID of the lcd screen?Thanks for any feedback, and again, this is my first forum post so I apologize ahead of time for any convention I am not following.

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 01, 2015, 06:02:43 pm
content: Your proposed design seems to assume that the LVDS interface works at exactly the same timing as VGA.I don't think that is a viable assumption. The conversion is quite a bit more complex than that from what I have seen.OTOH, there are LCD controller boards that have everything worked out for you that are available assembled and tested for very low prices.Many for less $$ than it would cost you to buy the bare components.

author: ermay12
author_rank: Newbie
timestamp: June 01, 2015, 06:08:10 pm
content: Thank you for the speedy reply. Yes I could buy a controller much cheaper, but this is a learning exercise. When you say that the lvds interface doesnt work at the same time as the vga, do you mean the pixel clock is different or what? Because there is no pixel clock at a VGA port. So wouldn't the computer adjust the rate of data transmission based on the monitor resolution and couldn't I set that. The monitor's tech sheet says it must operate at a set frequency.

author: ermay12
author_rank: Newbie
timestamp: June 01, 2015, 06:11:41 pm
content: Attached is a picture of the timing specifications for the lvds lines.

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 01, 2015, 06:19:16 pm
content: There is no specific signal output called "pixel clock" on the VGA interface, but it is "derived" from knowledge of the scan rates and the pixel dimensions. They used clever circuits in monitors (both CRT and LCD) to figure out what is the actual "pixel clock" on the incoming VGA signal so that the analog signals can be sampled and turned (back) into digital values.Ben Heck did a very interesting video about the very project you are proposing. Reverse engineering the LVDS interface in order to create a FPGA interface solution.https://youtu.be/DIIjVSmbtFc

author: bktemp
author_rank: Super Contributor
timestamp: June 01, 2015, 06:59:44 pm
content: Quote from: Richard Crowley on June 01, 2015, 06:19:16 pmThose clever circuits are lists with horizontal and vertical frequencies for all supported resolutions. There may be more advanced algorithms, but they are limited because most VGA->TFT converter ICs are built around a 8051 microcontroller.@ermay12You could use a TVP7002. It has a built in PLL for generating the pixelclock from the HSync frequency. If you set the VGA resolution to match exactly the display resolution this works well.I did something similar many years ago using a TVP7000. A microcontroller checks the horizontal and vertical frequency and enables the display only when the resolution matches.

author: ermay12
author_rank: Newbie
timestamp: June 01, 2015, 07:54:15 pm
content: Thanks @bktemp. I have a feeling that they don't make the TVP7002 as something I can solder.What I am confused about is how I can set the pixel clock frequency. I guess I need to do more research, but the spec sheet says the pixel clock frequency must be between 66.5mHz and 72.8mHz. Wouldn't this imply that this value is already determined and unalterable. See the attached screenshot. Also, since I am using the circuit on the same computer, couldn't I calculate the frequency myself and then buy a clock of the right frequency, rather than buying a chip like the TVP7002.

author: jamesglanville
author_rank: Contributor
timestamp: June 01, 2015, 08:06:10 pm
content: Just a thought - have you considered doing this as an fpga project? laptop lcds are really easy to talk to when you've got all that high speed logic:http://forum.gadgetfactory.net/index.php?/topic/1629-using-an-old-laptop-display/Provided you've got enough ram on the fpga, it's easy to make a framebuffer so you don't need to remotely synchronise the vga and lvds clocks.

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 01, 2015, 08:13:36 pm
content: Quote from: ermay12 on June 01, 2015, 07:54:15 pmThat is what I meant in my first response: "The conversion is quite a bit more complex than that" and the remark about the VGA timing. You will essentially have to implement a frame-buffer to accommodate the difference between the VGA modes you want to support, and the timing requirements of your LCD display.As @jamesglanville and @BenHeck suggested, you could do this as an FPGA, but unless you are already an FPGA developer, it is probably a steep (and expensive) route to take. But there is no simple solution any way you slice it.

author: ermay12
author_rank: Newbie
timestamp: June 01, 2015, 08:21:56 pm
content: Oh, ok thanks. I think that clears up my confusion then.So to make this work, I would first need to determine the pixel clock coming from the VGA port, store the pixel data in some memory device, then transmit the data to the monitor at the high speed it operates at?I don't know much about FPGA's, but I suppose I should eventually learn about them. However, I probably want to reevaluate whether I think I am up for this project. Thanks for all of your advice.