Inexpensive Analog RGB LCD interfaces
localroger
Posts: 3,452
Awhile back I reverse engineered the drive signals for a Philips PET 702 portable DVD player. I have reason to believe that a lot of inexpensive devices with 7 inch LCD's use this interface because it gives VGA type clarity with only three drive signals and NTSC level timing. But it's very nonstandard, and if you ever ran across it you're probably still scratching your head.
It is my intention to eventually make the Prop drive this thing, but I don't know how long it will take me to get around to it, and I am still something of a n00b with the PLL and video stuff. So I'm posting this here in case anyone else wants to take a shot at it.
The electrical interface is 3 lines for R, G, and B analog signals. There are no sync lines and in the PET 702 the amplitude is 630 mV, DC coupled. However, I think the display may (like NTSC receivers) be tolerant of wide variations in the signal amplitude.
All three color pins contain embedded sync information and you can actually drive "wrong colors" by hooking any one of the three drive signals to any one of the three LCD inputs.
Horizontal sync is achieved by inverting the signal on each successive scan line; that is, on the first line of a frame 0V will be black and 630mV will be white, while on the next line 630mV will be black and 0V will be white. Between frames of video there are runs of about 25 lines of black, which show up on an oscilloscope as very distinctive 63 uSec pulses. On a simple signal such as a DVD player screen saver you can also observe the alternation scheme in the video data. There is no "blacker than black" or other tip voltage as in NTSC, the whole voltage range is used for video color data.
The dot clock is 9 MHz and each line consists of 572 clocks: an 85 clock run of black, 480 clocks of data (the horizontal resolution of the LCD), and 7 clocks of black. After this 7 clocks of black the 85 clocks of black for the next frame start with inverted voltage, and this transition provides horizontal sync.
The vertical frame is 525 lines feeding two successive screens in just a smidgeon over 1/30 sec. The frame always begins with a noninverted (zero volts) black line. After 18 lines of black, there are 238 lines of data, 25 lines of black, 238 lines of data, and 6 lines of black for a total of 525 lines. Since 525 is an odd number the frame ends as it began with a non-inverted black line. At this point a new frame is begun, also with a non-inverted black line; this is the only time in the entire signal train where the signal remains at zero volts for more than one scan line time period and this is how vertical sync is realized.
I did a lot of the stuff to investigate this that you can't do easily with an oscilloscope by using a Propeller biased so that the DVD screen saver video signal traversed the 3v3 / 2 input threshold, and using PASM waitpeq loops to look for transitions in various ranges, so these timings are pretty accurate. For example, 30 frames should take 9,009,000 clocks, and as measured by the Propeller the delay between successive vsync double-zero lines is 2,669,436 80 MHz Propeller clocks; 30 such frames would be 80,083,080 clocks. This is well within the crystal thermal errors to exactly match 9,009,000 9 MHz clocks.
With this signal it should be possible to drive the 234 x 480 pixel display at 64 colors with 6 pins and the usual VGA resistors (you will need to provide the 75 ohm resistor to ground, since the input is high impedance). It should also be possible to drive the same resolution by 8 colors with just 3 pins and possibly no resistors -- from the data sheet it seems that the input may accept signals up to the internal power supply in amplitude, which is 5V. And of course you could drive one or more of the LCD inputs from the same drive signal for a interfaces down to 1 pin very trivially.
What I would like to realize is an aiGeneric style driver for this display which should be able to display 29 lines of 60 very crisp, readable text characters. With the DVD drive gutted and a Prop in its place, that could make one of these players a nifty little portable device.
It is my intention to eventually make the Prop drive this thing, but I don't know how long it will take me to get around to it, and I am still something of a n00b with the PLL and video stuff. So I'm posting this here in case anyone else wants to take a shot at it.
The electrical interface is 3 lines for R, G, and B analog signals. There are no sync lines and in the PET 702 the amplitude is 630 mV, DC coupled. However, I think the display may (like NTSC receivers) be tolerant of wide variations in the signal amplitude.
All three color pins contain embedded sync information and you can actually drive "wrong colors" by hooking any one of the three drive signals to any one of the three LCD inputs.
Horizontal sync is achieved by inverting the signal on each successive scan line; that is, on the first line of a frame 0V will be black and 630mV will be white, while on the next line 630mV will be black and 0V will be white. Between frames of video there are runs of about 25 lines of black, which show up on an oscilloscope as very distinctive 63 uSec pulses. On a simple signal such as a DVD player screen saver you can also observe the alternation scheme in the video data. There is no "blacker than black" or other tip voltage as in NTSC, the whole voltage range is used for video color data.
The dot clock is 9 MHz and each line consists of 572 clocks: an 85 clock run of black, 480 clocks of data (the horizontal resolution of the LCD), and 7 clocks of black. After this 7 clocks of black the 85 clocks of black for the next frame start with inverted voltage, and this transition provides horizontal sync.
The vertical frame is 525 lines feeding two successive screens in just a smidgeon over 1/30 sec. The frame always begins with a noninverted (zero volts) black line. After 18 lines of black, there are 238 lines of data, 25 lines of black, 238 lines of data, and 6 lines of black for a total of 525 lines. Since 525 is an odd number the frame ends as it began with a non-inverted black line. At this point a new frame is begun, also with a non-inverted black line; this is the only time in the entire signal train where the signal remains at zero volts for more than one scan line time period and this is how vertical sync is realized.
I did a lot of the stuff to investigate this that you can't do easily with an oscilloscope by using a Propeller biased so that the DVD screen saver video signal traversed the 3v3 / 2 input threshold, and using PASM waitpeq loops to look for transitions in various ranges, so these timings are pretty accurate. For example, 30 frames should take 9,009,000 clocks, and as measured by the Propeller the delay between successive vsync double-zero lines is 2,669,436 80 MHz Propeller clocks; 30 such frames would be 80,083,080 clocks. This is well within the crystal thermal errors to exactly match 9,009,000 9 MHz clocks.
With this signal it should be possible to drive the 234 x 480 pixel display at 64 colors with 6 pins and the usual VGA resistors (you will need to provide the 75 ohm resistor to ground, since the input is high impedance). It should also be possible to drive the same resolution by 8 colors with just 3 pins and possibly no resistors -- from the data sheet it seems that the input may accept signals up to the internal power supply in amplitude, which is 5V. And of course you could drive one or more of the LCD inputs from the same drive signal for a interfaces down to 1 pin very trivially.
What I would like to realize is an aiGeneric style driver for this display which should be able to display 29 lines of 60 very crisp, readable text characters. With the DVD drive gutted and a Prop in its place, that could make one of these players a nifty little portable device.
Comments
LOL. You a n00b. Now that's funny.
Awhile back I got a digital frame for the same purpose.
http://forums.parallax.com/showthread.php?125968-Digital-Frame-for-Prop-peripherals
Rayman said it might be analog RGB, can you tell by looking at it if fits your project?
It still lies dismembered in its casket, waiting to be awoken.
I am much more of a n00b than you, but if you want me to do something, I would love to contribute and learn from your work. Although I must confess that most of your post is outside my area of extertise. But, if you can tell me what you want done, I will try to do it. This could be a big asset to the community.
Yet CRT VGA displays are giveaways on the side of the road, and even the first generation LCD 13"-15" ones are very cheap at second hand stores.
So it would be great to have a higher resolution display in 7". Please keep us posted.
Yep. that would be nice for us type users. However, I wonder what the percentage of purchasers of photo-frames would actually make use of either interface?
I bought one when I needed a substitute for a dead 5" monitor. Got a 7" photo frame and when I looked inside, realized the interface was too complex. Furthermore, I needed something right now for a TV display; no time to experiment. Ended up getting a very nice 8" Sony DVD player; you know the type with a swiveling screen. AND had a proper Video In jack. Ready to use. Probably only looked at 1 or 2 videos so far.
Drag it out and find your hammer. We are going to make them dance! Now is the time to put it to good use.
Who can add another peice of the puzzle to localroger's post?
Has anybody studied rayman's project? It might have clues.
http://forums.parallax.com/showthread.php?98869-digital-photo-frame-as-low-cost-full-color-display
http://forums.parallax.com/showthread.php?100313-Digital-Picture-Frame
http://forums.parallax.com/showthread.php?109029-Using-a-Digital-Picture-frame-for-a-display
http://forums.parallax.com/showthread.php?116471-Digital-Photoframe-with-Prop
http://forums.parallax.com/showthread.php?123647-Hacking-Digital-Picture-Frame
A lot of folks have started, I bet there are a lot of the puzzle peices here already, we just need to put them together.