PDA

View Full Version : Propeller demoboard with sharp lcd lq9d011



hollywood
10-17-2006, 05:05 AM
has anyone an idea how to connect a lcd from an old laptop.

The 8,4" display is sharp LQ9D011.

The Datasheet is attached.

Paul Baker
10-17-2006, 07:11 AM
It's not entirely out the question to do it, but there are some major hurdles which make it quite difficult to do. First off is the memory required for full bitmap display, the display is 640x480 pixels with each pixel containing 9 bits (3 per color). This requires 345,600 bytes or 337.5 kBytes of data storage, this is more than 10x larger than the onboard RAM of the Propeller. But let's say you only want to display characters on the display using the built in 16x32 pixel font. The ASCII matrix and pallete colors for each character could be fit inside the Propeller.

The interface has 12 lines which need to be driven, to drive all these lines, a custom driver would need to be written in assembly. But lets say you want to use one of the onboard video generators and use it in VGA mode. This is an 8 bit output signal (2 Red, 2 Green, 2 Blue, HSync, VSync), you could tie the lowest bit of the LCD's colors to 0, use the colors from the video generator and get 64 colors instead of 512. Use the HSync and VSync, check that the signals for the LCD match standard VGA sync pulses and modify the VGA driver code if they don't. That takes care of 11 of the 12 pins needed to drive the LCD. What's left is the CLK signal for the LCD, this signal is not nessesary for the VGA so you'll have to synthesize it in you video driver. You can use one of the counters, making sure it is set up to operate in perfect synchronization with the video generator and viola you have a driver for the VGA.

So it is possible to do, however you have to constrain what you can do with the LCD to make it fit, and you will either need an oscilloscope or enough perseverance to get the timing of the clock signal synced to the video generator.

And one final note: a Demoboard couldn't be used since only 8 general I/O pins are availible.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

Post Edited (Paul Baker (Parallax)) : 10/16/2006 11:18:10 PM GMT

Bill Henning
10-17-2006, 10:38 AM
Hi Hollywood,

I'll chime in, since I've been working on driving similar panels for a while...

Paul pretty much nailed it, with some caveats.

640x480 is 307200 pixels; even a two color mode would consume 38,400 bytes - which is larger than the hub memory; and since the display expects nine bits per pixel, you'd actually need 345,600 bytes to make full use of the 512 color capability of the display at each pixel.

Now as Paul notes, you may be able to get it going as a character display; and it is possible that the video shift register could be used to help - this is something I am researching now for smaller panels than yours.

The basic problem is that the panel expects a clock with every pixel, and nine bits of pixel data for evey pixel position. I've been bugging Chip to put in a strobe on writes to I/O on future Propellers... this is one of the main reasons why!

One potential way of handling this is to re-program the video shift register and counter circuitry as follows:

- choose four color mode (ie four colors per pixel, with a 6 bit palette entry per color)
- hook up two bits each to R, G and B pixel lines, tie the LSB of each to ground
- program the timer in a decidedly non-standard fashion - emit an hsync for every pixel!
- program a vsync to emit the actual hsync for every scan lines worth of pixels
- manually generate the vsync

This *should* work.

Now, assuming that it does, either use the rom character set or allocate character tile space in hub memory

have a screen buffer for the tiles - see the hires VGA text driver for how to set up a color palette that gives you a different group of colors for every 12 scan lines, except here you should probably use 16x(2bits)x32 lines tiles, which would give you 40x30 tiles.

So for text only, you'd use:

30 longs for color palette entries
1200 bytes for the screen buffer

Now if you wanted to be able to have graphics tiles, you would have to allocate more hub memory to hold them... say you wanted 128 tiles... that would be 16384 bytes more memory used (16x2x32x128); or if 64 unique tiles was enough, 8192 bytes.

This is all contingent on being able to reprogram the video generators to emit an "hsync" for every pixel; should be doable.

Otherwise, you'd have to generate the byte clock etc yourself, and if you were using tiles stored in hub memory you'd need at least two cogs (possibly four) to meet all the timing requirements - it would be messy.

Remember, at 640x480x9 bits, 60Hz refresh, you have to generate a new pixel-word and clock for the display every 46.5ns (this would require overclocking the Propeller slightly, you'd need a 5.376344MHz crystal at PPLx16) and an hsync every 29.76us ... actually, this means to do it without the shift registers, you'd have to use two cogs, synchronized, painting alternate pixels; and due to the hub memory bandwidth requirements, you'd probably have to use two pairs of two cogs, alternating every few scan lines... yuck.

Bottom line: if the video circuitry can handle being programmed like I suggested above, a tile based text mode should be feasible in one cog.

If the video circuitry can't handle it, two cogs might be able to handle 8x12 text tiles from cog memory like the hirez vga driver.

Failing that, brute force and four cogs might work.

Let me know how it turns out http://forums.parallax.com/images/smilies/smile.gif

Bill

Post Edited (Bill Henning) : 10/17/2006 2:45:06 AM GMT

Paul Baker
10-17-2006, 10:55 AM
Hey Bill, are you by chance working on a SONY ACX705AKM?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

Bill Henning
10-17-2006, 11:01 AM
Not yet, but I'm thinking about it... I need a low price source for them; the size etc is quite nice for some potential projects I'm considering, and the 240x160 resolution makes for a managable frame buffer size :)

hollywood
10-18-2006, 03:54 AM
Thank you, bill and paul.

My idea was to take the lcd display as a normal vga monitor.

The Problem (like Paul describes) is the pixel clock. By googeling i found a circuit which is in the attachment.
The pixel clock here is made by an oszillator. Can i replace the Oscillator by a frequency generated by the propeller chip ?

Is the frequency signal generated by propeller chip stable enough for pixel clock or is it better to use an oscillator from an old vga-card?

Paul Baker
10-18-2006, 04:03 AM
Hmmm, well the 25.175MHz is a problem, you couldn't get the exact frequency, but thats not the biggest issue. A cog runs at 20MHz, theres no way to fetch the data and present it fast enough.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

Bill Henning
10-18-2006, 11:11 AM
well... an LCD is still not a VGA display.

And there is not enough memory to run the display in bitmap mode.

You *might* get a somewhat wrong display by hooking up the lines as per the schematic you posted, using the vga code with the right number of scan lines, pixels, BUT also setting front / reach porches to 0

I don't really think it would work, and it would definitely not syncrhonize properly, but you might sorta see something.

Paul Sr.
11-04-2006, 04:18 AM
Bill Henning said...
Not yet, but I'm thinking about it... I need a low price source for them; the size etc is quite nice for some potential projects I'm considering, and the 240x160 resolution makes for a managable frame buffer size :)


Bill,

Electronic Goldmine has them right now on sale for $14.95 www.goldmine-elec-products.com/prodinfo.asp?number=G13752 (http://www.goldmine-elec-products.com/prodinfo.asp?number=G13752)

I have one and have been looking for a controller. Other then EarthLCD (HUGE $$$) I haven't been successful.

Bill Henning
11-04-2006, 01:20 PM
Thanks Paul!

Will get·a couple to play with...


Paul Sr. said...

Bill Henning said...
Not yet, but I'm thinking about it... I need a low price source for them; the size etc is quite nice for some potential projects I'm considering, and the 240x160 resolution makes for a managable frame buffer size :)


Bill,

Electronic Goldmine has them right now on sale for $14.95 www.goldmine-elec-products.com/prodinfo.asp?number=G13752 (http://www.goldmine-elec-products.com/prodinfo.asp?number=G13752)

I have one and have been looking for a controller. Other then EarthLCD (HUGE $$$) I haven't been successful.