Go Down

Topic: Graphic LCD (KS0108) library now available (Read 49 times) previous topic - next topic


seeedstudio


Frisken

Hi!
I downloaded the KS0108 library and it works like a charm with my type B 'ATM12864D' LCD.
Thanks for the good work on converting it to be Arduino friendly :-)

After looking at the code of the library I discovered that in many of the functions there is a call to a function ReadData(). This function is also used in the WriteData() function.
What data arrives from the LCD and why is it needed?
Is this data vital to be able to send the correct commands to the LCD or would it be possible to use a one way communication (meaning never read from LCD, only send to it)?
\Frisken

mem

Hi Frisken, good question, here is the answer.

Each write to the lcd  affects 8 pixels. But when setting a specific pixel, the state of the other 7 pixels need to be known so that the value of the unchanged pixels can be re-written. That's what the read is for, there  isn't enough RAM on the Arduino to store the state of the entire display.  

Frisken

Ok, I see.
Theoretically if I clear the LCD before each update and never write the same 8 pixels area twice it should be possible to update the LCD without reading from it.
Is the 8 pixels vertically or horizontally added to the display area?

Go Up