Difference between revisions of "Arduino: How to control a KS0108 based graphic LCD"
(Created page with "Projects with Graphical LCDs are nice and it is not so big deal to access them from MCU. Interface for KS0108 and compatible controllers (Hitachi HD61202, etc.) is similar to ...")
Revision as of 15:29, 31 December 2012
Projects with Graphical LCDs are nice and it is not so big deal to access them from MCU. Interface for KS0108 and compatible controllers (Hitachi HD61202, etc.) is similar to HD44780. Compared to HD44780 it is much more simpler because KS0108 don't contain character generator. Data written to RAM are directly displayed on screen. I ommit some of details similar to HD44780. If you are not familiar with this controller then please read article about it first. Result of commands can be checked via LCD Simulator prior to programing MCU. For example i like this one: DjGfXLCDSIM
Small note: It looks like control lines CS1 and CS2 are different from module to module. I recommend to check datasheet from vendor.
Internal memory organization
Standard LCD module have resolution 128*64. This is 1KB (1024 bytes) of visible data. Every bit represent "one" dot on graphical LCD so there is no limitation for displayed data. Display itself is split to two independent parts controlled by two controllers (64*64/left + 64*64/right). Each half contain 8 horizontal pages which are 8 bit high. Control lines CS1/CS2 select controller (e.g. left or right part of display). Page select "line" on display. Inside Page you can select "slice" by setying Y Address or simply address.
|Controller #1 CS1=1, CS2=0||Controller #2 CS1=0, CS2=1|
|Page 0||Page 0|
|Page 1||Page 1|
|Page 2||Page 2|
|Page 3||Page 3|
|Page 4||Page 4|
|Page 5||Page 5|
|Page 6||Page 6|
|Page 7||Page 7|