KS0108 (Graphic LCD) Controller library

Hi Guys/girls,

I've found a Library for the popular 128 X 64 Graphic LCDs using the KS0108 Controller, what I dont know to convert this library for use with the arduino.

The page is here, and the link to the Library is about 1/2 way down

"http://www.scienceprog.com/controlling-graphical-128x64-lcd-based-on-ks0108/"

Does any one know of a Library for interfacing arduino to a graphic LCD using the KS0108 controller?

It seems that the 16X2 (Hitachi) and smaller are well and truly documented, but little is available on larger LCD displays.

Regards Whitto

Hi Whitto,

The primary work would be to either: - rewrite the functions that read and write data and commands to use the arduino's digitalRead and digitalWrite functions - or convert arduino digital pin assignments to the low level port and bit values used in the ks0108 low level code.

You can find more info on how the arduino maps its ports here: http://www.arduino.cc/en/Reference/PortManipulation

BTW, there is another avr library for the ks0108 chip here: http://en.radzio.dxp.pl/ks0108/ that you may want to look at. I would think the work to make it arduino friendly would be about the same as yours but I have not had a chance to compare the functionality to see which would be more useful and would be interested if you have a view.

I have a ks0108 chip based LCD in my parts box but don't have the time to do a port at the moment. But I would be happy to help from the sidelines.

Hi Mem,

Thanks for the other link. I'll have a look at both this weekend. and let you know what I think. Would be nice to put something back to the project...

At the moment I'm assuming a few hours maybe 4-8 should do it do you think thats a reasonable estimate of my time.

I've never done a library before (I read the guide in the playground, which seems straight forward enough).

Regards Craig Whitto

Hi Craig,

Its not difficult making a library once you have working code. But before you get to that, I suggest you start by looking at the two implementation options and choose the one you are more comfortable with.

Then get the code into a test sketch by including the relevant source files as tabs in your sketch (you can do this by copying the c and h files to your arduino test sketch directory).

When you have this running you then need to convert the functions to C++ class methods. There is a tutorial here http://www.arduino.cc/en/Hacking/LibraryTutorial that gives an overview of how to do this. And there are a number of people here that I am sure will be glad to help.

I just had a quick look at the two source code options and I think the one you found may be the better choice, if only for its more flexible font implementation. I noted that both versions used hard coded delays that should probably be modified for the arduino.

Have you managed to look at this yet? I have a similar LCD which I'm keen to use with the Arduino - let me know if I can help somehow.

jai. .

Hi Tyggerjai,

I've not had the time to look at it as yet (the wife keeps on finding stuff for me to do!!)

The library I linked to is quite good and it should only take a few hours to get the code working, Ive just not been able to get to it.

These LCD modules are very popular probably the most popular GLCD's on the market so we should have at least basic support for them available. I just need the time to get back to it. :(

Hey mem, is there a simple way to maybe use "define statements" to get this working quickly? (delays aside)

Cwhitto