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
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.
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.
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.
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.
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.
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.
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?
I just installed v3 RC2 on my Teensy++ v2 and it works great. It shows 16.4 FPS.
A request -- Please consider including the ks0108_Teensy++.h config file, attached.
Thanks again for your time on this project.
Regards,
Larry
I'm not understanding what this teensy++ config file would be used for.
(with respect to the latest glcd library)
Maybe if you explained a bit more what you are needing, it would help.
=== more details.
The way things are configured in the latest version of the library is very different from the previous version.
The define names are different and now every glcd pin can be defined separately.
teensy++ should work "out of the box" by selecting the teensy or teensy++
board type in the Arduino IDE (with teensyduino installed).
The IDE will set the processor type and the glcd library auto-configuration
header files will key off that to automatically select an appropriate pin configuration file.
The final pin configuration file included for teensy/teensy++ boards glcd/config/ks0108_Teensy.h
supports both teensy and teensy++
A bit of detail:
glcd/glcd_Config.h includes the top level configuration file. By default this is set to include
glcd/config/ks0108_Panel.h which is the top level auto-configuration file for a ks0108 glcd panel.
The ks0108_Panel.h header file will then use the processor type
(which is set by selecting the board type in the Arduino IDE)
to determine which pin configuration file to include.
If you have your board type set to teensy or teensy++ then glcd/config/ks0108_Teensy.h
is included. Then inside glcd/config/ks0108_Teensy.h there are ifdefs to select which set of defines are used
to define the pins for teensy vs teensy++.
Michael and I set up the pin defines in the teensy pin configuration file as Paul had requested so it matches the
pin descriptions in his examples and on his web pages for both the teensy and teensy++.
NOTE:
Paul has not yet updated the teensy website yet, for the latest version of the glcd library. He
has a modified version of the ks0108 v2 library available on his site for use with teensyduino.
From looking at the header file you attached, the supplied teensy/teensy++ pin configuration
file appears to use the same pins, but the file you attached seems to be more in a form for the
older version 2 of the library.
Thats why I'm a bit confused as to what this header file would be used for?
Thank you for an informative reply. I've tested it, and you're 100% right, stock GLCD v3 rc2 works great with the Teensy++ v2. No extra files are needed.
I was confused when I saw that the v2 glcd lib had two separate .h files for teensy and teensy++. -- So I copied over the v2 header file as you surmised.
Anyhow, as Emily Litella used to say, "Never mind."