Pages: [1]   Go Down
Author Topic: 122x32 graphical lcd  (Read 1639 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 142
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Guys, I was given this graphical LCD by a mate, and have never really used them before, but am wanting to givie it a try.
http://www.rapidonline.com/Electronic-Components/122-x-32-Dot-Graphic-LCD-Displays-500168
I have wired it up and tried to use the wiring from this thread:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1256871972
I cant get the sketch to compile however that the author links to. When I power my arduino (2560) All the pixels turn on (get darker) and I was wondering if someone had some simple code that would give me an example of drawing a simple shape on the lcd so that I could get started.
Thanks
A
Logged

Germany
Offline Offline
Edison Member
*
Karma: 136
Posts: 1479
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems to be a SBN1661 controller. PDF is here: http://www.21icsearch.com/pdfdetil_C6DAED857A09381C.html
Similar to KS0108, but probably not fully compatible. I have never seen a AVR or Arduino lib for this display, but maybe u8glib could be modified for it. As a starting point, the ks0108 u8g device can be used (the page address command is identical):
http://code.google.com/p/u8glib/source/browse/csrc/u8g_dev_ks0108_128x64.c

Oliver
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 142
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for that.
I'll need to create a "board" that matches my screen size i suspect?
I suppose I need to change the size of the screen in one of the supplied "screen" configurations to match the one i have, is there much else I would need to change?
« Last Edit: June 08, 2012, 11:39:49 am by a.mlw.walker » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 142
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I have run the hello world example and I chose the
U8GLIB_KS0108_128 u8g(44, 43, 42, 41, 40, 39, 38, 37, 51, 49, 48, 50, 45); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16

lcd. I those pin numbers are the correct ones it is connected to if I understand the naming of my lcd's pins correctly. I am confused though mainly about the usual 'EN', mine has a pin called Vo - contrast adjustment, thats not the same is it? Mine doesnt seem to have an EN.
Could someone have a look at the pin labelling please:
http://www.rapidonline.com/pdf/57-2269.pdf
page 8.
Then I am assuming A0 is DI.
When I connect it up, I can see the pixels changing color but not what the code says should appear. I wasn't sure though how to set how big my lcd is...
And what is page height?
« Last Edit: June 08, 2012, 01:13:19 pm by a.mlw.walker » Logged

Germany
Offline Offline
Edison Member
*
Karma: 136
Posts: 1479
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

A0 is the same as DI.
After review of your display datasheet, i have noticed, that there is no Enable (EN) line. Instead the chip select lines are used to transfer a byte. Unfortunately, this will require a special COM device (I have to rewrite some low level procedures).

The dimensions must be changed in
http://code.google.com/p/u8glib/source/browse/csrc/u8g_dev_ks0108_128x64.c
Redefine the two define statements:
Code:
#define WIDTH 128
#define HEIGHT 64

additional tasks include:
- review of the init sequence
- check the page transfer commands

I will also send a PM.

Oliver
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 142
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Oliver
I've emailed you at your email address you gave me
Thanks for all your help
A
Logged

Dallas, TX USA
Online Online
Faraday Member
**
Karma: 67
Posts: 2692
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That glcd module is not a ks0108.

The signals in the pinout look a lot like a SED1520 interface.
SED1520 uses separate enables for each chip vs a single enable and chip selects.
Also, the commands for sed1520 are different from a ks0108.
The few commands mentioned in the datasheet I can verify align with the sed1520 commands.
(END, RMW, RESET)
The datasheet mentions table 27 but it is not there.
There are many other necessary commands that are not in the datasheet.
For example, they mention the Set Column Address command in the text but there is no table or
description of it anywhere else in the datasheet.

Without an known accurate full datasheet for the glcd module
it will be very hard to tell what it is and how to hook it up.

I did find this data sheet which seems to be the parent document:
http://www.allshore.com/pdf/Avanti%20SBN1661G.pdf

At this point, it does look like it uses a sed1520 compatible chip.
All the commands line up with the sed1520 commands.

The glcd library has sed1520 support.
While it does not have a generic sed1520 autoconfiguration file
it does come with a manual configuration file for the vk5121.

The reason I didn't supply a generic sed1520 panel configuration file is
that there didn't seem to be any consistent pinout or geometry for modules
that used sed1520 modules.

You could try the vk5121 file "as is" (assuming you can use Arduino pins in the config file) with the glcd example diag sketch.
It will have issues but  it should display enough to see if it works.
I would recommend that you create a manual configuration file for your display based on the vk5121 file.
The only configuration difference would be the geometry. This display seems to be 122x32 whereas,
the vk5121 is 120x32.

Make a copy of the vk5121 file, change its name then modify
DISPLAY_WIDTH to 122
CHIP_WIDTH to 61

To keep things straight, I'd also recommend changing:
glcd_ConfigName

Then modify the Arduino pin numbers in your newly created config file to what ever pins you want.

--- bill
Logged

Pages: [1]   Go Up
Jump to: