Pages: [1]   Go Down
Author Topic: Sparkfun's 1$ COLOR QVGA LCD - How to use?  (Read 1317 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's it, is there any way to connect those 1$ screens to Arduino? http://www.sparkfun.com/commerce/product_info.php?products_id=8843
If I got if right, they've got a 30 pin connector, so a screen controller would be needed. I'm interested about this because these displays are 50 - 100 times cheaper than their competitors; It would be a real bargain!
« Last Edit: September 06, 2008, 11:41:50 am by mettapera » Logged

Grenoble/Lyon - France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 363
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a reference for a driver chip : HD66790 from Renesas


But if you want to go manual, from "reading" the datasheet pretty quickly and for not being the best guy you could ask, I'd say this :

Pinout :
Code:
1-33 > DUMMY
2-3 > LCD_POWER : 2.8V
4-9 > LCD_DATA : BLUE COLOR (6 bits)
10-15 > LCD_DATA : GREEN COLOR (6 bits)
16-21 > LCD_DATA : RED COLOR (6 bits)
22-31-32 > GROUND
23 > SPI : MAIN CHIP SELECT (MLCD_CS)
24 > SPI : SERIAL DATA INPUT (D_SDA)
25 > SPI : SERIAL DATA CLOCK (D_SCL)
26 > DOTCLOCK
27 > MAIN LCD RESET
28 > HORIZONTAL SYNC
29 > VERTICAL SYNC
30 > DATA ENABLE

This is a 320x240px 262k colors. We have 18 pins for the colors (4>21), so I think I'll use some kind of 18bit serial-to-parallel shift register to code the colors. In fact, I don't think 18 bits SR exists, so I'd use 3*8 bits, like some 74HC164, one for each color.

I'm not really sure of how HSYNC and VSYNC works (and the whole process behind writing to a bare LCD), but here's my guess.
The screen is 320 pixels width, 240 height.
What I'd test is to generate a clock (let's take some dummy timing).
First, I'll use a unit of 1 for the DotClock.
I think the DotClock will update the pixel register when triggered, then you change the values of the color shift registers, retrigger the DotClock and it updates the next pixel.
Then, each 320 DotClock ticks, I'll tick the HSYNC, so that it moves to the next line and continue memorizing the image in it's registers.
Last, each 240 HSYNC ticks, I'll update the VSYNC so that I display what is in the graphic register.
A quick LCD_RESET so that it clears the register and I'll start again.

I think you'll have to use a width*height*fps = 320*240*30 = 230.4KHz clock, but I'm certainly wrong as apparently, some datasheet recommends a 4.8MHz clock.
http://forum.sparkfun.com/viewtopic.php?t=12101&start=0&postdays=0&postorder=asc&highlight=

Last guesses and I'll stop with the brain masturbation : I'd pull DATA_ENABLE high, and I just don't know what to do with the SPI interface....

Ok, Sorry for having lost your time ^^
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply! After reading some datasheets I'm pretty convinced that buying serial screen in the first place is a lot easier. But thanks anyway!
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6755
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like one of those "typical" LCD displays that you have to refresh continuously, rather like a CRT screen (and at similar refresh rates.)
I've always been curious just how much you can "cheat" on one of those (10 frames/sec?  1 fps?) by decreasing the dotclock...
For initial experiments, I'd wire all 6 bits of each color together, giving you on/off control of each color, for an 8-color display.  Just cause it HAS 18 bits doesn't mean you have to use them all!
Logged

Grenoble/Lyon - France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 363
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

true ^^
Might order some to see how you can work with this... Rather than hooking up an MCU, it can be interesting to work with analogic electronics only, to make some kind of oscilloscope or audio visualiser out of it.

Anyone have a good source of info on how HSYNC, VSYNC etc... works on these kind of displays ?
Logged


Boulder, CO
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I want to be a really useful engine!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From the driver datasheets, it looks like there are 2 ways to use this. One way is with a serial interface (SPI) which writes to RAM.  The contents of the RAM will be displayed thereafter I assume.  The other approach is the parallel "moving picture" approach which uses the V/HSYNC.  If you ignore the parallel approach, this might actually be easy to use.  Of course, I'm not sure how you get the data to fill the RAM into the arduino since one frame is way more SRAM than the arduino has.  Perhaps if you are generating your images by algorithm?  

These look like interesting displays, I have been thinking of getting one, but I would like a way to interface it with an NTSC or VGA output, not an arduino.  Anyone know if sparkfun has a walk in floor room?  I could throw a stone out of my office and hit their building. smiley
Logged

Denver
Offline Offline
God Member
*****
Karma: 20
Posts: 779
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
 Anyone know if sparkfun has a walk in floor room?  I could throw a stone out of my office and hit their building. smiley

You can visit Sparkfun. When I was there they didn't have a showroom as such, but I'm sure they'd pull the part for you. Nice guys, worth the visit.
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

SF Bay Area
Offline Offline
Edison Member
*
Karma: 11
Posts: 1244
Arduino Ninja
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

They probably won't be as nice if you've been throwing rocks at their building.
Logged

Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34184
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
One way is with a serial interface (SPI) which writes to RAM.

This is only for initialising the display and for writing to an overlay display memory that has only a few largish pixels and don't cover the whole of the screen. Also there is only a single bit of RGB colour on this overlay.

It is meant for things like the numbers you see on top of displays on camera's view finders.
Logged

Boulder, CO
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I want to be a really useful engine!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
They probably won't be as nice if you've been throwing rocks at their building.
laughing,... thnx smiley


Quote
This is only for initialising the display and for writing to an overlay display memory that has only a few largish pixels and don't cover the whole of the screen. Also there is only a single bit of RGB colour on this overlay.  
Hmm, what makes you say that?  Do you have the datasheet for the HD66790?  The two similar datasheets linked to provide the following:

* The HD66789 has a graphics RAM that stores bit-pattern data of 176 x 240 bytes with 18 bits per pixel.

* The HD66781 incorporates RAM with the capacity of one QVGA-sized whole screen of 240 RGB x 320 x 18bits plus 96 raster-rows.
« Last Edit: September 10, 2008, 10:22:46 am by MartinFick » Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34184
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hmm, what makes you say that?  Do you have the datasheet for the HD66790?

No but comments on the Spark Fun page say:-
Quote
The only info I've found on the HD66790 so far looks bad. It's described as a RAM less controller and the system example shows it connected to a CPU via a "display controller processor" and external ram for the display.

I have used similar devices before in embedded systems. They are designed to be used on a processor with a built in LCD driver that constantly refreshes the display with the video information. They also need a lot of initialisation using the SPI interface before they will do anything.
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Quote
Hmm, what makes you say that?  Do you have the datasheet for the HD66790?

No but comments on the Spark Fun page say:-
Quote
The only info I've found on the HD66790 so far looks bad. It's described as a RAM less controller and the system example shows it connected to a CPU via a "display controller processor" and external ram for the display.

I have used similar devices before in embedded systems. They are designed to be used on a processor with a built in LCD driver that constantly refreshes the display with the video information. They also need a lot of initialisation using the SPI interface before they will do anything.
The HD66789 datasheet linked on the sparkfun product page for that lcd indicates that it has 95,040 bytes of ram, which would be sufficient for a 176 x 240 dot 16 bit color display

The sparkfun page says the controller is an hd66790, has anyone any info on how that differs from the one linked by sparkfun.
Logged

Pages: [1]   Go Up
Jump to: