t6963_09

T6963

This driver supports display modules based on the Toshiba T6963 chip. These displays are made by different manufactures, and come in various sizes (mine is a Thoshiba TLC1091, which is really large: 240×128 pixels, which make 40 rows and 16 columns). You're right: I said “pixels”. The T6963 is a graphical display controller. Although there's no support for any graphic elements in lcd4linux at the moment, the driver does all operations in graphics mode (similar to the X11 or raster driver). All the font rendering, bar drawing and so on is only pixel based, the T6963 character mode is never used.

As these displays seem to differ very much in their internal layout, you have to specify your display type exactly. At the moment only two displays are supported: my “TLC1091” and the “DMF5002N”. I'd like to have some feedback from other displays, maybe I can find a way to generalize this stuff.

The displays are connected to the parallel board (see “Wiring” below), and are quite timing-critical. There's no way to delay a usermode program under Linux for e.g. 40 usec, so we have to do busy-waiting. This has been done in a delay loop, which had to be calibrated. Since 0.98 there are two new delay loops, one based on the processor's TSC (Time Stamp Counter), one based on gettimeofday(). lcd4linux decides automatically which one to use (it prefers the TSC method, but falls back to gettimeofday() if neither the tsc flag nor the MHz value is set in /proc/cpuinfo). Calibration is no longer necessary!

The T6963 uses a bidirectional protocol, it is necessary to read data from the controller to perform the so called 'status check'. This check returns if the T6963 is busy or idle (and ready for the next command). Therefore your parallel port has to be bidirectional!

The driver knows of two ways of controlling the parallel port: The (old, ugly and unportable) raw programming of ports, and the new, cool, great ppdev() style. You decide which one to use by specifying either a hexadecimal value or a device file with the 'Port' entry in the config file.

Note that the old port programming only works with standard ports (0x3f8, 2f8,…), but not with PCI parallel port cards.

ppdev requires kernel 2.4. The configure script detects if you have the required include files, and deactivates ppdev if they are not there. You should use ppdev whenever possible! Raw port access may be dropped someday.

The driver needs the following entries in lcd4linux.conf:

Display: “TLC1091” or “DMF5002N” \

Port: either the hexadecimal address of the parallel port (“0x378”) or a ppdev device (“/dev/parports/0”) \

Size: columnsxrows e.g. “24×8” \

Wire.CE: default “STROBE” (see Wiring below) \

Wire.CD: default “SELECT” \

Wire.RD: default “AUTOFD” \

Wire.WR: default “INIT” \

The driver is not really stable at the moment. As I'm using graphics mode, there's a lot of data to transfer. To speed up things, I'm using a double buffer and the so called auto mode of the T6963. With this mode, you don't have to specify a command for every byte, but send a whole buch of bytes, which saves about 50% of transfers. Unfortunately, this does not always work as expected, I regularly get hangs in the status check. Therefore I would like to get feedback from other users.

My TLC1091 display has 20 pins, the last two (pin 19 and pin 20) are not connected. Power (+5V) must be supplied via pin 2(GND) and pin 3(+5V), be careful not to change polarity, you will destroy your display! Pin 4 is used to control the contrast, it needs a negative voltage of about -7V. To create this negative voltage, I used a DC/DC converter (NMA1212) and a potentiometer (10k) between GND and -12V, and connect pin 4 to the slider.

Starting with lcd4linux 0.9.9, there's a “parallel port abstraction layer” which makes the wiring completely configurable! (this is what the Wire.xy entries in the configuration are for). If you use a different wiring scheme, you have to change these lines accordingly.

The wiring configuration uses abstract signal names (e.g. STROBE) instead of pin numbers on the parallel port. So here's a translation table:

PinNameI/O
1STROBEOut
2DB0I/O
3DB1I/O
4DB2I/O
5DB3I/O
6DB4I/O
7DB5I/O
8DB6I/O
9DB7I/O
10ACKIn
11BUSYIn
12PAPER ENDIn
13SELECTOut
14AUTOFDOut
15ERRORIn
16INITOut
17SLCTINIn
18-25GNDn/a

Now for the wiring details:

  • The data lines (DB0..DB7 on the display, DB1..DB8 on the parallel port) are connected directly.
  • The “CE” (Chip Enable) signal has to be connected to one of the control signals (STROBE, SELECT, AUTOFD or INIT). LCD4Linux's default is STROBE.
  • The “CD” (Command/Data) signal has to be connected to one of the control signals. LCD4Linux's default is SELECT.
  • The “RD” (Data Read) signal has to be connected to one of the control signals. LCD4Linux's default is AUTOFD.
  • The “WR” (Data Write) signal has to be connected to one of the control signals. LCD4Linux's default is INIT.

As the T6963 needs all four control signals of the parallel port, it is not possible (at least not in a simple way) to connect an additional circuit for GPO's.

I built a little interface board to my TLC1091 display. It consists of a stabilized voltage regulator to create the +5V, a DC/DC converter to get the negative contrast voltage, a potentiometer to control the contrast (supplied with -12V) and a connector to the parallel port.The whole board needs +12V supply voltage. Here's the schematic and board (designed with eagle):


  • t6963_09.txt
  • Last modified: 2020/07/17 18:33
  • (external edit)