About me






















Graphic LCDs are nice to play with. I have a Powertip PG 12864-D . It is a 128*64 graphics LCD with two Samsung KS0108 controllers (one for the left and the other for the right half of the display). So, the

info presented will cover LCDs with KS0108 and compatible controllers (Hitachi HD61202 and others,if any).

If you have ever worked with HD44780 controlled character type LCDs, you will find the KS0108 easy to work with. They have a similar interface, and you may easily change your HD44780 code to suit the KS0108. I will assume that you know how the HD44780 interface works. This means that basic things like reading from/writing to DDRAM, checking the busy flag, and etc. will not be covered here. You may find such info elsewhere on my LCD pages.

You can think of a 128*64 LCD as a 1024 bayt memory , every bit of which is visible. The display is split logically in half. It contains two controllers with controller#1(Chipselect1)controlling the left half of the display and controller#2 (Chipselect2) controlling the right half. Each controller must be addressed independently. Each half consists of 8 horizontal pages which are 8 bits (1 byte) high. The page addresses, 0-7, specify one of the 8 pages. That is illustrated in the drawing below.


8 horizontal pages which are 8 bits  high.

Below are the KS0108 & HD61202 commands. These controllers do not have text capability andthe commands are few and simple.

KS0108 & HD60202 Commands

Y address (0-63): Y address counter designates address of the internal DDRAM. An address is set by instruction and is increased by 1 automatically by read or write operations of display data. Y address 0 is the leftmost bayt, and Y address 63 is the rightmost byte of a page.

X address (0-7): This is the page address and has no count function.

Display start line (0-63): The display start line register specifies the line in RAM which corresponds to the top line of LCD panel, when displaying contents in display data RAM on the LCD panel. It is used for scrolling of the screen.