I am telling you guys, all the lines are perfectly soldered and in the correct place. I have ripped them out and rewired it like 15 times and double checked with a dvm continuity test every time.
Then it should be working.
The library has been thoroughly tested on many different glcds, so it is unlikely to be a library problem.
Having written the glcd library initialization code, the diag sketch,
and worked with MANY users of the library, I can tell you that
99+% of the time, the problem is incorrect wiring or wiring issues.
Of the remaining non wiring issues, it is a bad glcd.
And when the GLCD is bad, it is almost always due to previous incorrect wiring.
And of the glcds that were bad, the majority would still pass diagnostics, they just
wouldn't display any pixels because the negative power supply needed for the
contrast circuit was blown.
I can also say that in the vast majority of the cases, the users believe that their wiring is correct.
My recommendation is to stick with the diag sketch until things start working, it is the best tool for trying to diagnose the problem.
During initialization, the library code will first check for 2 things.
- the glcd to indicate that its internal RESET is complete
- the glcd is ready to accept a command.
In that order.
What you are seeing from the diag output is that the library gave up waiting for the glcd to say
it is ready to accept a command so the library never even tried to initialize the glcd.
That means that the status bit for BUSY is not transitioning low. This is bit 7 on the data bus.
NOTE: without initialization, no pixels will show up, so turning the pot will have no effect.
Also, reading the ks0108 busy status of the LCD is more complex than simply reading data bit 7
so doing a digitalRead() on pin 7 isn't providing any useful information.
This BUSY timeout condition is more than likely caused by:
- incorrect chip select configuration in the config file.
- bad wiring
- bad glcd.
From looking at the datasheet, it appears the the glcd you have is compatible with the default
chip select configuration which can be seen in the diag output.
CSEL1=1, CSEL2=0 for chip 0 and CSEL1=0, CSEL2=1 for chip 1
That tends to point to a wiring issue.
Wiring issues can be either incorrect wiring, or wires not making proper connections.
In order to work, your wiring for the data and control lines
must match the wiring indicated in output from the diag sketch.
For the other glcd and pot connections, it must be wired according to the documentation
on playground page, or included HTML or PDF files.
It is very hard to tell how things are wired given the blurry photos and all
the wires are the same color.
From the datasheet I can tell the pin 1 should be in the right or along the top of pins
in your photos.
It is VERY hard to tell where the wires are going and it is impossible to tell the quality of the
While I can't really tell where the wires go,
there are some things that look suspicious.
In the 2nd photo, I can't see any wire connections going to glcd pins 18 (Vee) and 17(RST)
In the 1st and 2nd photo, it looks like some Arduino digital pin (around 13 or so)
is hooked to glcd pin 20 which according to the datasheet is backlight ground.
The pot doesn't look like it is hooked up correctly. One leg should be going to Vee
but in the photo it looks like it is hooked up to the backlight +voltage input.
Can you take some clear photos so we can see where the wires go?
Use macro mode to get clear images. We need to be able to tell where each wire goes.
A clear photo of the back would be nice to verify the glcd module type and
to have a look at the soldering.
Also, can you indicate how you have wired up everything?
which Arduino pins are connected to which glcd pins and
what is connected to each of the pot connections.
Also what is connected to the other glcd pins that don't connect
to arduino pins.
(all 20 glcd pins should be connected to something)