| Author |
Message |
|
|
Posted: Feb 17, 2007 - 07:54 PM |
|

Joined: Jan 22, 2007
Posts: 13
|
|
HI,
i am final year student. i don many program in avrgcc.Now i am doing a project on a game in LCD(128x64graphic LCD).
i refered many data sheet regarding lcd but i am not satisfied. please suggest me how to do program in LCD. |
|
|
| |
|
|
|
|
|
Posted: Feb 17, 2007 - 09:50 PM |
|

Joined: Jun 12, 2006
Posts: 63
|
|
| even i was looking for information on 128 x 64 lcd interface. Any tutorials or sites where lcd programming is explained clearly ??. I have interfaced 16 x 2 lcd earlier. It was very well described in www.avrbeginners.net . any such help for 128 x 64 graphic monochrome lcds?? Or any previous project done would also be of great help... thanks in advance |
|
|
| |
|
|
|
|
|
Posted: Feb 17, 2007 - 11:39 PM |
|


Joined: Feb 19, 2001
Posts: 19075
Location: Wisconsin USA
|
|
The first thing to determine is which controller chip the LCD is using. Then you look for examples of applications that already have done projects with that controller chip (or compatibles). An example is "T6963C".
Lee |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2007 - 01:49 AM |
|


Joined: Nov 01, 2005
Posts: 4907
Location: Hilversum - the Netherlands
|
|
| Lee said:
Quote:
An example is "T6963C"
One other possibility is KS0108. But on many Chinese-made-displays you won't find a number at all. The chip is then a bond-out: all you find on the pcb are black "spots" covering the bond-out chip.
Plons |
_________________ Problems with Parallel Port Programmers ? Read this:
http://www.aplomb.nl/TechStuff/PPPD/PPPD%20English.html
|
| |
|
|
|
|
|
Posted: Feb 18, 2007 - 03:54 AM |
|


Joined: Feb 19, 2001
Posts: 19075
Location: Wisconsin USA
|
|
True enough, Plons. But I was trying to prod OP into doing a little basic digging. With English results, Google gives as the first hit on "g321d" the user's manual, and the third hit, without even clicking through, says
Quote:
Seiko G321D Seiko G321D 320X200 Monochrome Graphics Display - with the SED1330 Controller Chip - $30 - This Screen Is NOT BACKLIT! ...
So then you plug SED1330 into searches of this site and Google, and find driver code for AVRs or others that people have already shared. |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2007 - 04:32 PM |
|

Joined: Jun 12, 2006
Posts: 63
|
|
| Is there no other way to determine the controller used in the lcd?.Any coding or anything..? I dint bother to find it out when i bought it. stupid me... |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2007 - 04:34 PM |
|

Joined: Jan 22, 2007
Posts: 13
|
|
| The model no of my LCD is hy12864k -202.I don't have the data sheet of the LCD but I referred other LCD data sheet. Even i don't know about the controller of the LCD. Please give some info which help full for me. |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2007 - 06:05 PM |
|


Joined: Nov 01, 2005
Posts: 4907
Location: Hilversum - the Netherlands
|
|
@crazyfrog: hard to tell from the pictures. Mine looks simular and says YM12864C and uses 2 KS0108 controllers. Note that KS0108 use high active CE's. I read quite often there is a mix-up in CE-pins on the datasheet, but than it's assumed that the CE's are low active.
Did you do what Theush recommended?
@Lee: I was naive ....
Plons
Edit: @Lee: apparently I am naive. Sigh .... when will I ever learn  |
_________________ Problems with Parallel Port Programmers ? Read this:
http://www.aplomb.nl/TechStuff/PPPD/PPPD%20English.html
|
| |
|
|
|
|
|
Posted: Feb 18, 2007 - 07:26 PM |
|

Joined: Jun 12, 2006
Posts: 63
|
|
so can i presume that KS0108 T6963C SED1330 are the possibilities for a graphics 128 x 64 lcd?
In that case im gonna start my trial and error straight away. Would the hardware interface also change with controllers or is it only the protocol used that is different.
Quote:
The first thing to determine is which controller chip the LCD is using. Then you look for examples of applications that already have done projects with that controller chip (or compatibles).
here i go start with T6963C ( In parallel il contact the shop where i bought the lcd and ask him to tell me the controller). thank you.. |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2007 - 09:45 PM |
|

Joined: Nov 19, 2001
Posts: 582
Location: San Luis Obispo
|
|
Wouldn't one be able to trace the power/control/data lines from the input connector
to the bond-out blobs and from their order determine which controller is buried?
Input connector pin designations can be revealing. There are several variants of the
Epson SED controller series. Don't trust my table very far.
Stan
Code:
Graphic LCD Controller Pin Connections
Line T6963 SED133x SED133x HD61830 KS0108
---- ----- ------- ------- ------- ------
#pins 67 60 60 60 100
VDD 27 58 21 -- 3
VSS 63 13 36 -- 78
VCC -- -- -- 29 --
GND -- -- -- 20 --
D0 10 59 22 21 79
D1 11 60 23 22 80
D2 12 1 24 23 81
D3 13 2 25 24 82
D4 14 3 26 25 83
D5 15 4 27 26 84
D6 16 5 28 27 85
D7 17 6 29 28 86
/CE /CS 20 56 19 15 --
Reset 2 47 10 14 93
/WR 18 51 14 -- --
/RD 19 50 13 -- --
R/W -- -- -- 17 94
RS -- -- -- 18 95
E -- -- -- 16 99
SEL1 -- 52 15 -- --
SEL2 -- 53 16 -- --
A0 -- 57 20 -- --
Xtal 66 54 17 -- --
Xtal 67 55 18 -- --
|
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 04:35 AM |
|

Joined: Jun 12, 2006
Posts: 63
|
|
Thats interesting Mr. sbennet. But how would i be able to see the connections of the lcd controller. Do i have to open the lcd now? I have gone through a few controller datasheets . It dint help but confused me more. In the LCD all i can see is 20 pins. But the controller datasheets show 64-100 pins...
i suppose the pins that come on an lcd are the data pins VDD Vss contrast D0-D7 chipselect bits R/W RS EN backlight +ve -ve... Am i right? |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 06:44 AM |
|

Joined: Nov 19, 2001
Posts: 582
Location: San Luis Obispo
|
|
|
Quote:
But how would i be able to see the connections of the lcd controller.
The idea is to trace the power/control/data lines from the interface connector into
the blob that holds the controller, noting their order along with all the other traces
going into the blob, then compare that order for a match with one of the controllers.
Quote:
i suppose the pins that come on an lcd are the data pins VDD Vss contrast D0-D7
chipselect bits R/W RS EN backlight +ve -ve... Am i right?
No supposing, you have to know the actual pin designations.
A data sheet for the specific LCD with a pinout legend of the interface is required to
determine the function of each pin on the interface connector. Lacking that specific
data sheet/pinout makes it unlikely that the controller type can be determined.
Often data sheets can be found by a google search of model/part numbers printed
on the LCD board, but there are many odd ones that can't be found.
Following circuit traces on very dense boards is another problem. Tracing by continuity
can be done if the applied voltage is kept to 0.5V or lower, as higher voltage could
damage the controller.
Be aware that some LCD controllers require a specific startup initialization from the
driving microcontroller to map out pixels properly. Also the KS0108 does not include
a character generator, characters will have to be sent as a bitmap, not just a
character code.
It is diffcult enough making a graphic LCD work when you have complete data on the
LCD and controller. To make an LCD of unknown connections/controller work by
someone with little experience is very unlikely. Acquiring an LCD package that includes
interface connection data and controller information is a better solution.
Please provide a link to the data sheet for your LCD or at least the model/part
numbers printed on your LCD.
Stan |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 09:28 AM |
|

Joined: Jun 12, 2006
Posts: 63
|
|
Thanks Mr stan, model number is HY12864K-202 05115 same as the picture above posted by @crazyfrog. I got the datasheet after a googl e struggle. I have attached it.
The datasheet says that the controller is S6B0108 or compatible. Is this same as ks0108
and as in the picture above it has got three blobs , i guess they are three controllers (S6B0108)
The data sheet had a 8051 code example. Im currently trying to convert into AVR and try it in hardware.
Any information ,advice and examples on (S6B0108) controller based 128 x 64 monochrome graphic lcd welcome... |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 10:59 AM |
|


Joined: Jan 03, 2006
Posts: 3220
Location: Hemel Hemsptead, UK
|
|
You have all the information in that datasheet - plenty to go on for an inquiring young mind
The code that's there should convert without too much effort into AVR GCC (it's a lot easier to play with higher level languages than machine code, for drivers) but most of it appears to be chinese character display data...
I'd resrict myself to the routines lcd_init, delay, and lw, for now, the better to understand what's going on.
The structure of the data as displayed is as a series of vertical lines - that is, the first *byte* displayed forms a pattern of eight dots in a vertical line in the top left hand corner, with the low byte at the top. This is a purely graphical display, so you'll need to write five or so successive bytes to show a letter:
Code:
*
* *
* *
*****
* *
* *
Each vertical column is the result of writing one byte. There are various character sets available for this - I have one on my VK5121 project here: http://www.avrfreaks.net/index.php?modu ... tem_id=501
Another thing to remember is that there are two controllers - each handles half the screen. This is why there are two CE lines and also explains the 'if (x < 64)' statement in the demo code.
Good luck.
Neil |
_________________ Neil Barnes
www.nailed-barnacle.co.uk
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 06:01 PM |
|


Joined: Sep 04, 2002
Posts: 13548
Location: Orlando Florida
|
|
| I guess this was a clever way of organizing pixels to make it easy to display characters, but it sure is different than every other graphics display in the world. I had to use a ks0108 a while ago, and I drew lines and chars the 'normal' way in a 124x64 (1K), wrote a nested loop thing to 'pick up' 8 bits from 8 rows from ram and send em to the lcd controller. Updates the whole screen... 64 bytes across is a stripe of 8 pix... 8 of those for each half of the screen. Nice fast full screen update. If you have 2k of ram, you can have 2 buffers |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 07:51 PM |
|

Joined: Jan 22, 2007
Posts: 13
|
|
| oh great!! i went through the datasheet several number of times and figured out the way of organisation .. there are arranged in pages vertically. Eight pages in all 0-8 and the 128 columns. We have to create the array for writing a specific character.. Is the refresh rate fast enough to allow us to create animations or games?? |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 08:02 PM |
|


Joined: Sep 20, 2003
Posts: 2743
Location: Surrey, England
|
|
|
Quote:
Is the refresh rate fast enough to allow us to create animations or games??
That depends on what you mean... You should be able to get the data to the LCD fast enough (depending on your clock speed), but some B&W LCD's have a slow optical response. |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 08:07 PM |
|


Joined: Sep 04, 2002
Posts: 13548
Location: Orlando Florida
|
|
| Is 5 or 6 frames a sec fast enough? Thats 166-200ms a frame... I recall writing the whole screen as I described a couple message ago only took 50ms or so.... 1000 write loops at ??usec per loop? |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 09:52 PM |
|

Joined: Nov 19, 2001
Posts: 582
Location: San Luis Obispo
|
|
|
Quote:
The datasheet says that the controller is S6B0108 or compatible. Is this same as ks0108
The Display Commands table in the HY12864K attachment duplicates the Samsung KS0108
controller data sheet Display Control Instruction table. They are compatable if not the same.
Cornell link Graphical LCD Driver and Educational LCD Primer
Stan |
|
|
| |
|
|
|
|
|
Posted: Feb 19, 2007 - 10:09 PM |
|

Joined: Jun 12, 2006
Posts: 63
|
|
| I successfully converted the 8051 program into an avr one and got the hex... building my circuit now and waiting for the output curiously.. |
|
|
| |
|
|
|
|
|