Graphics Driver for SSD1289

  • 1
  • 2
  • Page 1 of 2
nwrightson
Benutzer
Avatar
Gender:
Location: Newcastle
Age: 63
Homepage: nweha.homeserver.c…
Posts: 362
Registered: 08 / 2003
Subject:

Graphics Driver for SSD1289

 · 
Posted: 23.11.2011 - 09:14  ·  #1
Hi,
I'm writing a driver for the SSD1289 LCD driver using the GraphIOS.
The display I have is a 320*240 RGB LCD with a 16bit data bus and 4 control lines.
The display can be set for 65K colors or 262K colors. I will use 65K color mode.
Each pixel uses a word to store the color for that pixel. So that means 320*240*2=153,600 bytes.
From what I can read of the data sheet so far is that :
1. The address range goes from 0,0 (top left corner) to 319,239 (bottom right corner)

2. The numbering/order of the address's to get from the top left to the top right is configurable.
Refer to the below picture. You can set some registers in the LCD to select what scan direction to take. I think the top right is the correct option?

3.The driver IC has a built in auto address increment. So to write a series of pixels from the top left to the top middle, select the start address (0,0) and the final inc amount ie (0,180) then write a word representing the color for each pixel along the line.

So how does this fit in with the GraphIOS driver?

Neil

Attachments
Address sequence
Filename: LCD.jpg
Filesize: 266.41 KB
Title: Address sequence
Download counter: 165
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Graphics Driver for SSD1289

 · 
Posted: 24.11.2011 - 18:05  ·  #2
Hello Neil,

if you manage it to complete drive 320x240 with 16bit colors with an 8bit machine, congratulations! I'm sure you will get a Nobel prize 8-)

I suggest you use an "intelligent" display like these from Electronic Assembly which provide easy interfaces and powerful graphic commands. Most of them are equipped with a touch screen. Not cheap, of course. But less headaches und very fast/short developing time.

rolf
nwrightson
Benutzer
Avatar
Gender:
Location: Newcastle
Age: 63
Homepage: nweha.homeserver.c…
Posts: 362
Registered: 08 / 2003
Subject:

Re: Graphics Driver for SSD1289

 · 
Posted: 24.11.2011 - 23:08  ·  #3
Rolf,

Thanks for your support and answering my question.

I don't want 16 bit colors. 16 colors would be good enough.
Basic drawing of text, squares, circles, shading etc and touch screen buttons is all I require. Everything AVRCo currently does.

None of this seems to be an issue for MikroElectronika or other XMega examples on youtube, even showing movies.

Neil.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Graphics Driver for SSD1289

 · 
Posted: 25.11.2011 - 14:25  ·  #4
Hello Neil,

you wrote
Quote
I will use 65K color mode.

Sorry, I don't have any idea how to manage this.

rolf
nwrightson
Benutzer
Avatar
Gender:
Location: Newcastle
Age: 63
Homepage: nweha.homeserver.c…
Posts: 362
Registered: 08 / 2003
Subject:

Re: Graphics Driver for SSD1289

 · 
Posted: 26.11.2011 - 00:27  ·  #5
Rolf,

In the GraphIOS decode, I was looking at accepting a Byte color value and doing a look up for the correct word value that represents this in the 65K color scheme.
Ie if Byte = 2 then //Green selected
SetPixel(X,Y,($07E0); // $07E0 Word value. Write Green at X,Y Pixel location


Correct me if I'm wrong but the AVRCo LCD graphics driver creates a copy of the LCD screen in the memory of the AVR?
I want to use the existing AVRCo graphics tool library for drawing etc but "I think" I don't need to keep a copy of the LCD in the AVR's memory for refresh or what ever. 320*240*65K is to big for the AVR. Perhaps 320*240*Byte. Where the byte represents the color. Still 9600Bytes.
Am I correct?
Can I use the graphics driver functions without the local copy? Why do we need a local copy?


Neil.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Graphics Driver for SSD1289

 · 
Posted: 26.11.2011 - 20:58  ·  #6
Hello Nei,

a local copy of the graphic frame is only necessary with those displays which are read-only.
8bits (1byte) per pixel is not possible and not implemented.
But a simple color scheme is implemented. See the Profi Driver Manual.

rolf
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Graphics Driver for SSD1289

 · 
Posted: 28.11.2011 - 18:05  ·  #7
@Neil:
You can always have something like SetColor(NewColor) before calling AvrCo functions, and your GraphIOS can respect that color setting until you change it again. This approach lets you use existing AvrCo monochrome drawing lib functions. That is of course for smart displays with a memory. If you have fixed number of colors - like 8, then you can look at the problem quite different. You can have 3 separate monochrome planes for R, G and B, and you can change them by something like SetPlane(NewDrawingPlane). Then your GraphIOS can check which plane is active and use AvrCo drawing functions to draw proper plane (R, G or B). With this approach even if you buffer all three planes you will need just 3*9600 bytes wich fits 32KB SRAM chip perfectly.
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Graphics Driver for SSD1289

 · 
Posted: 29.11.2011 - 10:49  ·  #8
  • 1
  • 2
  • Page 1 of 2
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 15   135   150 · Page-Gen-Time: 0.020248s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI