Skip to content

fbrausse/ssd1963

Repository files navigation

Summary
~~~~~~~
SSD1963 is a user-space driver library for the so-named display controller chip
by Solomon Systech.

It provides functions to initialize and control the Framebuffer on that chip as
well as setting up frequencies, display timings and the bus from the controller
to the LCD.

About the controller
~~~~~~~~~~~~~~~~~~~~
The SSD1963 is an LCD controller with an inbuilt framebuffer of 1215 KiB to
hold the RGB values for each pixel. It supports quite a set of commands that
allow to easily manipulate what's shown on the LCD without changing the actual
data in the framebuffer.

This library provides access to all the documented commands the controller
supports.

Files
~~~~~
gpio.[ch]	Raspberry Pi specific macros/functions for general GPIO access
itdb02.h	Panel definitions for ITead Studio ITDB02 displays
ssd1963.[ch]	Core of the library, macros/functions to command the controller
ssd-cat.c	Sample program using this lib to draw data to the framebuffer
ssd-gpio.h	Helper header to let the commands in ssd1963.h talk to RPi GPIO
ssd-gpio-rpi.[ch]	Mapping the bus/control lines to specific RPi GPIOs

Library
~~~~~~~
To use the library, the header "ssd1963.h" needs to be included in the source
file. Also either one of the following must be provided prior to including the
header:

 - provide #defines for the macros
    - SSD_WR_CMD(x)
    - SSD_WR_DATA(x)
   that each will perform a write of an 8-bit-value to the lower 8 bits of the
   data bus connected to the SSD1963 controller chip by asserting #WR, writing
   and releasing #WR. The first macro needs to assert the D/#C line as well
   during that whole write cycle.

   Optionally the macro SSD_RD_DATA() may be defined which allows the
   initialization code in ssd_init_pll() to verify that the PLL of the chip
   indeed has settled on the specified frequency settings and is stable.
   However, initialization will also proceed without this macro being defined.
   In my local experiments I haven't found a setting and PLL combination that
   would produce unstable results.

 - or #define SSD_IO_MACROS to a path name (including surrounding "quotes")
   pointing to a C header file that defines the above macros.

Example
~~~~~~~
ssd-cat.c provides a basic example of how to use the ssd1963.h header. It uses
the GPIO settings defined in ssd-gpio-rpi.h to communicate with the controller
via GPIO pins (8 for the data / cmd bus and 3 for read/write/command control).
It also assumes an ITDB02-4.3 display to be connected to the RPi, though the
only thing necessary to change would be the display definition, see itdb02.h
for those already defined and ssd1963.h, struct ssd_display for reference.

Those displays by ITead Studio also contain a touch controller which can be
talked to using SPI which the Raspberry Pi supports natively. Its bus lines
can also be connected to the Raspberry Pi, though the pin numbers currently
used by the header ssd-gpio-rpi.h will need to be changed.

There even is a driver for the touch controller XPT2046 in the kernel, called
ads7846. At

	http://karlchenofhell.org/kram/spi-touch-controller-3.2.27.patch

a patch for the Raspbian Linux Kernel 3.2.27 may be found which attaches the
appropriate driver to the SPI bus and provides the initial platform_data
required by the ads7846 driver to identify the touch controller. After that
modification, Linux will automatically load the driver and provide the touch
screen as a standard input device.

About
~~~~~
Author of this code is Franz Brauße.

The homepage currently is http://karlchenofhell.org/kram.php?part=ssd1963

This code is available under the BSD 2-clause license which is to be found in
the LICENSE file.

About

C Library to talk to SSD1963 display controllers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published