This is an old revision of the document!
Published 18 Aug 2022
Ks0073 Driver Library
I have a pile of display panels from Siemens optiPoint 500 series phones, that I wish to use in Arduino projects. These are 2 line by 24 character LCD status displays, controlled by Samsung KS0073 - a Hitachi HD44780 compatible LCD controller/driver chip that includes an SPI style serial interface.
I looked for an Arduino library that would talk to this chip-set, but failed to find one.
I based my library module for this on a standard Arduino library for the Hitachi HD44780 chip, LiquidCrystal.cpp. The programs included here are HelloWorld.ino, LiquidCrystal_ks0073.cpp and LiquidCrystal_ks0073.h.
The command set is compatible with the Hitachi HD44780 with extensions.
The KS0073 controller chip is capable of 4 bit and 8 bit parallel and SPI style serial interfacing, but in these modules is hardwired for serial only. The controller is mounted on a PCB and joined to the LCD glass via a PCB flex cable. I think the flex cable is a weak point in the design as some modules display missing columns of pixels (best seen when the contrast is turned right up and some characters only show as narrow strips rather than solid blocks - pressure on the cable changes which columns of pixels are displayed. The LCD module has a 10 pin, 1mm pitch, PCB flex cable to connect to a suitable socket.
The displays are a two lines of twentyfour, 5 by 8 pixel, characters.
The great advantage of these serial SPI LCD modules is the simplicity of the Arduino interface. There are four signal lines SID (data to the display), SOD (responses from the display), SCLK (clock), and CS (select). Plus power (+5V) and ground (the module should also work from a 3.3V supply).
There is a separate power line, VCI, to supply the voltage converter that sets the LCD contrast voltage, around 1.3V was typical.
The data pins can be any available Arduino pins.
The KS0073 uses its own variation of a SPI protocol where data and commands are prefixed by a control byte that specifies what the following bytes are going to be - ie read/write data, or a command.
All bytes are sent least significant bit (LSB) first, on the rising edge of SCLK. The control byte consists of 5 successive “1”s followed by command/data register select (RS) and read/write (R/W) bits. So typically you assert CS and send a control byte indicating a command follows, the the command. If there is data to be sent, send a control byte followed by a stream of data bytes terminated by releasing SS. Both commands and data are split into two nibbles and a prefix of four “0”s is added to each - so there will never be a stream of commands or data containing five successive “1”s. ie to send 00011111, you send 0000 0001 0000 1111. So the KS0073 can always unambiguously re-synchronise to the command stream.
I used a minimum of 2uS for the clock cycle for SCLK and, as I was not checking the ready status of the chip, a delay of about 40uS between sending bytes to give sufficient time for the chip's internal processing.
As mentioned earlier the library is based on a standard Arduino HD44780 LCD library. Most hardware commands, including programmable characters, seem to be compatible with the HD44780, but I would need to do a lot of experimentation to find any extended commands.
The functions implemented are:
The functions appear to be the same as for the HD44780 but have not been extensively tested for compatibility.
After setting a programmable character future writes also go to the programmable character CGRAM (corrupting it) until you deliberately switch back to the display ram. This is a problem from the original LiquidCrystal.h library - the solution here is that I just reset the cursor to the home location after programming characters.
The programs (v1.00):
If any referenced page no longer exists, try looking for its URL on http://archive.org.