This driver supports display modules based on the Mitsubishi M50530 chip. These displays are made by different manufactures, and come in various sizes. The main difference between the M50530 and the HD44780 is taht the M50530 can control much larger displays (mine has 8 rows and 24 columns).

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 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 supports vertical, horizontal and split bars (two independent bars in one line), all bar types can be used simultanously. As the displays only have 8 user-defined characters, the needed characters to display all the bars must be reduced to 8. This is done by replacing characters with similar ones. To reduce flicker, a character which is displayed at the moment, will not be redefined, even if it's not used in this run. Only if the character compaction fails, this characters will be redefined, too.

The driver needs the following entries in lcd4linux.conf:

Display: “M50530” \

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

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

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

Wire.IOC1: default “SELECT” \

Wire.IOC2: default “AUTOFD” \

Wire.GPO: default “INIT” \

GPOs: number of general purpose outputs, use 0 (zero, which is the default) to deactivate this feature \

My M50530-based display has 16 pins. Power (+5V) must be supplied via pins 15(+5V) and 16(GND), be careful not to change polarity, you will destroy your display! Pin 14 is used to control the contrast, it needs a positive voltage of about 10 V (it really needs more than 5V! It took me weeks to find out that my display is not dead :-) I used a potentiometer (10k) between GND and +12V, and connect pin 14 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:


Now for the wiring details:

  • The data lines (DB0..DB7 on the display, DB1..DB8 on the parallel port) are connected directly.
  • The “EX” (Execute, toggled when data is valid) signal has to be connected to one of the control signals (STROBE, SELECT, AUTOFD or INIT). LCD4Linux's default is STROBE.
  • The “IOC1” and “IOC2” (kind of 9th and 10th data bit) signals have to be connected to one of the control signals. LCD4Linux's default is SELECT for IOC1 and AUTOFD for IOC2.

You can connect up to 8 digital output lines (e.g. to drive a LED) to the parallel port with a simple additional circuit (see the HD4780 page for the circuit). These lines can be controlled by lcd4linux, and need an additional control signal from the parallel port. You have to specify this signal with the Wire.GPO entry in the config file (the default is INIT).

I built a little interface board to my M50530 display. It consists of a stabilized voltage regulator to create the +5V, 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):

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