Arduino openGLCD Library  Version v1.0rc3
 All Classes Functions Variables Enumerations Enumerator Groups Pages
Diagnostic Sketch

GLCDdiags is a test sketch included in the examples folder.

It will validate the connections and test the memory of GLCD module as well as report the active configuration information to the serial port. Unfortunately, the nature of glcd hardware interfaces is such that nearly all the pins have to be correctly configured and wired up correctly in order to initialize the glcd and see anything. If your display is not working properly then check the information displayed in the serial monitor. This shows what information the library is using and you can use this to help verify if the library is configured correctly.

The tests start off with a display that shows the library version and a test pattern. After a few seconds, the pixels on this initial display screen will blink off and on. If backlight control is configured, it will blink off and on as well. The tests conclude with a final display screen that indicates whether all the tests finished successfully and also reports the speed of the glcd::SetDot() API function call when setting non contiguous pixels which is a worst case (slowest) scenario as it requires additional low level glcd commands to reposition the glcd X & Y addresses between each glcd::SetDot() call.

Below is a sample of the diagnostic information available on the glcd display.

glcddiag1.jpg
Library version and Test Pattern
glcddiag2.jpg
Draws from upper left to lower right
glcddiag3.jpg
Flashes each chip# sequentially
glcddiag4.jpg
Testing chip0 memory
glcddiag5.jpg
Testing chip1 memory
glcddiag6.jpg
Results and SetDot speed (thousands/sec)

Below is a sample of the diagnostic information available on the serial port. The information includes library versioning information, all the configuration settings, which includes pin configurations as well as delay settings, and data port modes. It also includes results from all the diagnostic tests as they are being performed.

All the pin configuration information is displayed in both Arduino pin::s as well as AVR pin values.

Note
It is possible that under certain pin misconfigurations or wiring errors, no information will be presented to the serial port. In the event that no diagnostic information is showing up on the serial port, it may be necessary to disconnect the glcd to rule out that no misconfigured or miswired pins are conflicting with the serial port pins.
Serial initialized
--------------------------------------------------------------------
Reported Arduino Revision: 1.0.5
F_CPU: 16000000
--------------------------------------------------------------------
Lib Configuration: openGLCD ver: 0.5a
Lib build date: Aug 21 2013 20:36:08
Lib build number: (none/unofficial-release)
Panel Configuration:ks0108
Pin Configuration:ks0108-Arduino
--------------------------------------------------------------------
GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
CSEL1:A0(AVRPIN_C0) CSEL2:A1(AVRPIN_C1)
RW:A2(AVRPIN_C2) DI:A3(AVRPIN_C3) EN:A4(AVRPIN_C4)
D0:8(AVRPIN_B0) D1:9(AVRPIN_B1) D2:10(AVRPIN_B2) D3:11(AVRPIN_B3)
D4:4(AVRPIN_D4) D5:5(AVRPIN_D5) D6:6(AVRPIN_D6) D7:7(AVRPIN_D7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(A0,0x1, A1,0x0) CHIP1:(A0,0x0, A1,0x1)
Data mode:
d0-d3:nibble mode-Non-Atomic
d4-d7:nibble mode-Non-Atomic
Backlight: <Not configured>
--------------------------------------------------------------------
Diag Loop: 1
Initializing openGLCD
Displaying Library version Screen
Turning display & backlight on/off
Displaying ChipSelect Screens
Walking 1s data test
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): 16.21