GLCD library version 3 (end of life - no longer supported)

Update: 2015-03-25
The glcdv3 library has not been updated since late 2011.
It will not work with more recent IDEs and newer Arduino boards like
Arduino Leonardo, Due, Teensy 3.0/3.1/LC, Chipkit pic32 boards, AVR 1284 Bobuino,
AVR 1284 SleepingBeauty, as well as many others.
Also, Google has decided to terminate the google code site.
Sometime in 2015 Google is disabling all downloads, so glcdv3 library downloads will no longer be available from the glcdv3 repository and sometime in 2016, the Google code site is scheduled to be turned off.
Until then, see the glcdv3 main project page for alternative libraries.
https://code.google.com/p/glcd-arduino/

Essentially, glcdv3 has reached end of life.

For questions or support for other libraries such as openGLCD or u8glib start new threads.


This thread is a replacement for the older/original glcd v3 library thread
that became locked/read-only when the new forum was created.
Here is the link to the original thread:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1279128237/

The latest build of the GLCDv3 library can be found here:
http://code.google.com/p/glcd-arduino/downloads/list

--- bill

RC2 is now available for downloading.

This release is minor fixes and updates.
There are no new API functions.
See the download for details.

--- bill

kudos, bill.

Bill,

Would it be possible to include the T6963C library's into this ?
It seems like more people are getting these LCD's and can't find a suitable library ?

By "include the T6963C library's into this" I assume you mean to write
new code for the glcd library to support the T6963C so
it can be one of the chips supported by the glcd library?

Keep in mind that the v3 glcd library is just now about to be pushed into final release.

The existing glcd library code does have kind of a framework to support alternate chips and
there are a few others like the sed1520 that are already supported, but the framework
isn't completely generic. It depends on the glcd having a particular memory to pixel mapping.

Chips like the T6963C don't fit very well into the existing framework.
Also the T6963C has some additional more intelligent features and capabilities not in the simpler
graphic chips like the ks0108. It becomes a bit of a challenge to support the more advanced features
when they are available.

Michael and I have discussed the possibility of redoing how the various internal layers of the
library fit together to make it easier to add in support for new chips.

So while this may some day happen, we currently don't have it scheduled and are not looking
at it yet.

--- bill

Just got one of my LCD's working using the latest GLCD
Thank you very much.

It is the following display:

SED1520 compatible chips in it, so changed glcd.h to include the Modvk5121_Manual_Config.h config.
Had to modify the Modvk5121_Manual_Config.h file as m display is 122x32 rather than 120x32 which was default. It just made a gap between the two sides, and one on the end.

Works great running the GLCDdiags sketch. Very valuable sketch as I had it wired wrong to start with, and the Serial printout the sketch gave detailing the pins showed me I had 4 wires in the wrong order.
Was brilliant.

GLCDdiags stated:
K Setdot/s: 18.27

Running this on standard Arduino Duemilanove.
I hope to incorporate 2 of these displays on a 644P or 1284P for my project. I posted in the topic regarding 2 displays. (How to control 2 graphic LCDs with one Arduino - #33 by WanaGo - Displays - Arduino Forum)
Hopefully the library will work ok for the 1284P, running the core from Mark S.
Time will tell.

Thanks again
James

Added my tested B-type panel 12864J-1 to the playground model listing


(Full Size picture)

Walking 1s data test
Diag Loop: 1
Initializing GLCD
Displaying ChipSelect Screens
Wr/Rd Chip Select Test
Testing GLCD memory pages
Horizontal Page Test Chip: 0 Pixels 0-63
Vertical Page Test Chip: 0 Pixels 0-63
Horizontal Page Test Chip: 1 Pixels 64-127
Vertical Page Test Chip: 1 Pixels 64-127
Full Module Horizontal Page Test:Pixels 0-127
Full Module Vertical Page Test:Pixels 0-127
Tests PASSED
GLCD.SetDot() speed (K ops/sec): 19.10

Reported Arduino Revision: 22

GLCD Lib Configuration: glcd ver: 3 glcd_Device ver: 1 gText ver: 1
GLCD Lib build date: Sat 04/23/2011 15:01:49.03
GLCD Lib build number: 421
Panel Configuration:ks0108
Pin Configuration:ks0108-Arduino

GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
CSEL1:14(PIN_C0) CSEL2:15(PIN_C1)
RW:16(PIN_C2) DI:17(PIN_C3) EN:18(PIN_C4)
D0:8(PIN_B0) D1:9(PIN_B1) D2:10(PIN_B2) D3:11(PIN_B3)
D4:4(PIN_D4) D5:5(PIN_D5) D6:6(PIN_D6) D7:7(PIN_D7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(14,0x1, 15,0x0) CHIP1:(14,0x0, 15,0x1)
Data mode:
d0-d3:nibble mode-Non-Atomic
d4-d7:nibble mode-Non-Atomic

Just bought a 128x64 display and downloaded the library. Excellent library and the documentation was extremely useful in connecting the display.

Just one query, I am trying to run the ClockFace sketch and am getting a number of error when I try to compile it for a Mega2560:

clockFace.cpp:13:82: error: Time.h: No such file or directory
clockFace.cpp: In function 'void setup()':
clockFace:31: error: 'setTime' was not declared in this scope
clockFace.cpp: In function 'void loop()':
clockFace:37: error: 'now' was not declared in this scope
clockFace:48: error: 'hour' was not declared in this scope
clockFace:48: error: 'minute' was not declared in this scope
clockFace:48: error: 'second' was not declared in this scope
clockFace.cpp: In function 'void checkSetButton(int, int)':
clockFace:66: error: 'adjustTime' was not declared in this scope
clockFace:71: error: 'hour' was not declared in this scope
clockFace:71: error: 'minute' was not declared in this scope
clockFace:71: error: 'second' was not declared in this scope

What am I doing wrong?

Cheers
Z

Looks like you need the Time library from the playground. Arduino Playground - Time

I tried to use a Pacific Display Devices 12232-10, a 122x32 module that uses 2x sed1520, but I don't think it can be made to work with the current version on glcd without a lot of work. Please correct me if I'm wrong.

I figured out that 122x32 modules using the sed1520 fall roughly into two types:

The first type has an internal oscillator, brings out 2 enable lines (E1 and E2). It's a 68-Family MPU style interface. The VK5121 module in the example provided with the library is this type.

The second type of module has separate chips selects (CS1 and CS2) and needs and external 2 kHz clock. It's a 80-Family MPU style interface. The Pacific Display Devices 12232-10 module is this type.

Support for this type (I think the specific sed1520 variant is called sed1520-faa) would be great but I understand it may be outside of the scope of the upcoming release. If so, it might be a good idea to put some comments about supported types in the documentation or maybe just comments in the code itself to prevent confusion.

As I find time, I'll look at the code again and see if I can figure out what modifications are necessary to make it work. If I can get it to work, I'll be happy to donate the code. Considering my work schedule and lack of familiarity with the current code, it may be a while.

its the sparkfun's GLCD

why?

i have check the conections

i tried to change pin14 to A0 and 15 to A1 etc

but then its not compile

thanks a lot

I'm wondering if you can give a little help to an issue that isn't part of the official package. I'm trying to run the LCD via a shift register in order to free up some pins that I will need, following the instructions on this post. As you know, a lot of the codebase has changed, as well as some of the general layout, and as a result, these code changes don't work perfectly. In order to account for the layout changes this is in the glcd.cpp file.

The main problem I'm encountering is with the last piece of code in that post, the lcdDataShiftOut function. When compiling using the ks0108:: prefix, I get the error that ks0108 hasn't been declared, which is to be expected. When I run it with the glcd:: prefix, I get the error "no member function declared in class 'glcd'". When running without either prefix, it gives errors that FastWriteLow and FastWriteHigh weren't declared in that 'scope'. The problem is, I'm not sure where or how to declare them. Can anyone offer some advice for this? Thanks.

i found it

just a broken wire

this code

GLCD.DrawCircle(31,31,31,BLACK);
GLCD.DrawLine(31,31,31,0);

creates a vertical line not a horizontal

so it is GLCD.DrawLine(X0,Y0,Y1,X1);

This may be a really silly question. Is there a document that shows all the commands for these glcd screens? Or do you just have to pick apart the examples. IV got my screen working but im having trouble getting complex functions to materialize.

Thanks, swiffty

Any possibility of support for newer OLED displays?
I just picked up a Newhaven NHD-2.7-12864UCY3 display... It's a 128x64 panel driven by a SSD1325 controller (display datasheet) (controller datasheet). It has options for 6800-based, 8080-based and serial interfaces. I tried the 6800 setup as it is very similar to the type 2 wiring for the GLCD library. The exceptions being a couple of no-connection pins (contrast-related pins), the backlight pins are used to define the interface type, and there's only one chip-select line which has had its position swapped with reset (/CS on 17, /RES on 16). I'm getting no image with chip select on 33 or 34 of a Seeduino Mega running on 3.3V (for the sake of compatibility with the display)... I guess hoping it would just work was going too far. :stuck_out_tongue:

[edit]Added missing URL[/edit]

herctrap:
this code
GLCD.DrawLine(31,31,31,0);
creates a vertical line not a horizontal

from the reference doc:

void DrawLine (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t color=BLACK)

As I read it, the second pair of values for DrawLine are coordinates not sizes, so I would expect the given code to draw a vertical line.

Is there some way to change pin assignments without editing the .h files? I tried doing a #define in my sketch but it doesn't seem to make any different. Also tried #undef and #define.

Thanks...

swifftyb:
This may be a really silly question. Is there a document that shows all the commands for these glcd screens? Or do you just have to pick apart the examples. IV got my screen working but im having trouble getting complex functions to materialize.

Thanks, swiffty

The library includes lots of documentation. It includes a pdf file as well as a html documentation. The html documentation
has more detail and supports searching as well as many hyper-links to make navigating through the documentation easier.
The documentation includes documentation on every function as well as information on troubleshooting and diagnostics,
how to create bitmap files, and even custom fonts.
The location of the documentation is mentioned in the readme.txt file included in the library package.
Have a look at the readme file.
But basically, the documentation is the glcd/doc directory and you can click on file
GLCDref.htm to view it.

--- bill

wbphelps:
Is there some way to change pin assignments without editing the .h files? I tried doing a #define in my sketch but it doesn't seem to make any different. Also tried #undef and #define.

Thanks...

Not really. The glcd library does not use any of the arduino core code to drive the lcd pins. It converts the defines in the header
files to direct AVR pin i/o at compile time. The advantage of this is speed. Direct i/o is MUCH faster than using the arduino core code.
( digitalRead(), digitalWrite() functions)
It does come with some drawbacks. One of them being that the all the pins must be defined when the library code
is built, which is built separately from the sketch so it is not possible to re-define the pins inside a sketch file or runtime
inside a sketch.

What is the driving need?
Are you looking for a way to preserve your pin changes when updating the library?

--- bill