Pages: [1]   Go Down
Author Topic: Graphical LCD problem with glcd library (I Need Desperate Wiring Help)  (Read 1311 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please i need your help! I bought this LCD from ebay : http://www.ebay.com/itm/180841556770#ht_2329wt_905
here are some pictures i took with my phone:



the glcd library says i need to connect my wires like this:
#define glcdData0Pin        8
#define glcdData1Pin        9
#define glcdData2Pin        10
#define glcdData3Pin        11
#define glcdData4Pin        4
#define glcdData5Pin        5
#define glcdData6Pin        6
#define glcdData7Pin        7
#define glcdCSEL1        14
#define glcdCSEL2        15
#define glcdRW           16
#define glcdDI           17
#define glcdEN           18

but for my screen i have different names as you see like this:
VSS
VDD
V0
RS
R/W
E
DB0 -> DB7
PSB
NC
RST
Vout
BLA
BLK

so i guess R/W=RW and EN=E but i have no idea which Pin is for CSL1 and CSL2 and also is RS=DI?
when i connect them like this (R/W=RW, EN=E, DI=RS, PSB=CSL1, NC=CSL2) and i run the examples from the glcd library i always get only this result for all the examples:


Please help me!!! i am desperate!!!!!what i am doing wrong???please i need your help!Every comment will be very useful for me!
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That looks almost identical to a GLCD I am using. The giveaway is the PSB pin, which selects serial or parallel interface mode for the ST7920 controller chip.

The good news is that it can be driven in serial mode, which uses just 2 Arduino pins. The bad news is that it isn't compatible with older versions of the GLCD library, however I think GLCD 3 can drive it in parallel mode.

Here are some notes I made for driving it in serial mode:

// Pins for serial LCD interface. For speed, we use the SPI interface, which means we need the MOSI and SCLK pins.
// Connection of the 7920-based GLCD:
//  Vss to Gnd
//  Vdd to +5v
//  Vo through 10k variable resistor to +5v (not needed if your board has a contrast adjust pot on the back already, like mine does)
//  RS to +5v
//  PSB to gnd
//  RW to Arduino MOSI (see below for pin mapping)
//  E to Arduino SCLK (see below for pin mapping)
//  RST to +5v
//  D0-D7 unconnected
//  BLK to ground (or collector of NPN transistor if controlling backlight by PWM)
//  BLA via series resistor (if not included in LCD module) to +5v or +12v

I have a serial mode driver for it, which you are welcome to have, but my driver isn't compatible with the standard GLCD library and uses 1K of RAM for a frame buffer. To drive it in parallel mode you need to connect PSB to +5v.
« Last Edit: April 18, 2012, 02:16:58 am by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much for your reply!
Could you please send to me the serial mode driver?i can try maybe it will be good for me too! maybe to my email : vmiskoss@hotmail.com
Your notes works with your driver for the serial mode and without the GLCD 3 library?
I tried an other library for serial and parallel mode which i found here: http://www.mindkits.co.nz/CatalogueRetrieve.aspx?ProductID=1237732&A=SearchResult&SearchID=1809692&ObjectID=1237732&ObjectType=27
and it works but i can only write some text or load a bitmap with that library. I need to draw lines on the screen on specific place but i couldn't with that library. Any suggestion or help?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

On its way to you. The library includes functions for drawing straight lines and circles. My notes are for using this library, I have never tried GLCD 3 with this device.
« Last Edit: April 18, 2012, 01:01:48 pm by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

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

Sorry, at this point in time the st7920 is not supported by the glcd library.
See Oliver's U8glib: http://arduino.cc/forum/index.php/topic,91395.0.html

--- bill
Logged

Pages: [1]   Go Up
Jump to: