View Full Version : Help with KS0108 Driver
01-08-2009, 09:10 AM
After wiring up my glcd correctly, and looking at the correct datasheet I'm getting output but it's garbled. Before I followed the an incorrect diagram NOT provided by the author of the code I was seeing a bunch of chinese letters (I think my model has a built in asian font). Now, after using the authors diagram, I'm seeing pixels, which is comforting, but the display is garbled. I've attached screenshot (sorry for the graininess, don't have the best digi) and a datasheet for the device. I've wired the device according the instructions in the driver test program. I even changed r/w and ri as the author tested with a model similar to mine and reported that he had to change those - same result. I'm pretty certain I have the device wired correctly as I tried reversing wires and received no output so I'm assuming that the ucontroller is talking to the lcd. One thing to note, in the example code the frequency and clockmode were commented out. I tried with both RC and 5Mhz x 16pll. Same results.
01-08-2009, 10:16 AM
I have only experience with the LCD 16x2 (http://www.luisdigital.com/tienda/product_info.php?products_id=92), but a good place to practice is: LCD Info Page (http://www.geocities.com/dinceraydin/djgfxlcdsim/djgfxlcdsim.html)
Also: in the hardware do not leave anything disconnect.
01-08-2009, 10:38 AM
The controller on the datasheet you included is the ST7920. You will find detailed info here.
You will have to figure out how to initialize this display. Since it is displaying something already chances are that the write routine is working. However, the s6b0724 or t6963 code may be a more suitable starting point as the ks0108 driver is for dual controllers.
01-08-2009, 11:10 AM
Thanks Erik. I figured it was talking to the chip somehow, it just wasn't talking the right "language" so to speak. I figured the protocol was incorrect or timings may be incorrect. Thanks again!