linux4media l4m132c
usb colour display module

disclaimer / info:

DISCLAIMER:
THIS IS EXPERIMENTAL SOFTWARE AND HARDWARE. USE AT YOUR OWN RISK. THE MAINTAINER(S) OF THESE PAGES AND THE DEVELOPER(S) OF SOFTWARE AND HARDWARE PRESENTED ON THESE PAGES CAN NOT BE HELD LIABLE UNDER ANY CIRCUMSTANCES FOR DAMAGE TO HARDWARE OR SOFTWARE, LOST DATA, OR OTHER DIRECT OR INDIRECT DAMAGE RESULTING FROM THE USE OF THIS SOFTWARE OR HARDWARE. IF YOU DO NOT AGREE TO THESE CONDITIONS, YOU ARE NOT PERMITTED TO USE OR FURTHER DISTRIBUTE THIS SOFTWARE OR TO USE ANY TEMPLATES FOR BUILDING HARDWARE PRESENTED HERE.

linux4media l4m132c usb colour display module:

additional features and changes in version 1.97.9

this page contains all changes and additions that have been added to serdisplib version 1.97.9.
for library versions <= 1.97.8 the old page should be used.

new features:

  • support for monochrome mode (much faster full frame update).
  • support for the alarm features if provided by the firmware of the module.
  • selection between resolutions 128x64 and 132x65. if 128x64 is selected the remaining pixels are used for a visual feedback when receiving IR-remote signals.
  • introduction of an improved, non-linear way of setting display contrast (the non-linear contrast setting tries to neutralise the non-linear contrast levels of the display module).
    now the hardware contrast values for CONTRAST=0/5/10 are pre-set in the code, the hardware contrast values in between are calculated using a power function. this leads to a much better use of the contrast range provided by the display module.

important:

  • options RESMODE and ALARM* can only be used with current firmware versions !
  • if your display has erraneous pixels drawn at the right side try using RESMODE=1 (maybe you've got a firmware which only supports resolution 128x64)

description

l4m132c usb display modules are developed by www.digitaldevices.de.
[l4m132c overview] the package that was sent to me contained the following items:
  • display module (132x65, 64k colours) with USB module
  • RTC (real-time clock) on board
  • IR sensor + RUWIDO keyboard+mouse remote control

the USB module can be extended to support the following features:

  • input and output ports, both analogue or digital
  • pin-head to connect a PSoC programmer for firmware upgrading

the USB module registers with three USB interfaces when connected to a UNIX system:

  • two interfaces receive keyboard and mouse HID-sequences
  • the remaining interface is used for controlling the display (through ioctl-calls or libusb)
both mouse and keyboard functionality, in combination with the RUWIDO remote control, worked just fine out of the box without the need of additional configuration (tested on linux-systems).

 
[l4m132c ruwido + ir sendsor + display module]
L4M132C display module, IR sensor, RUWIDO remote control

specifications
resolution 128x64, 132x65 (selectable)
colours monochrome, 64k
controller display: unknown + Cypress CY8C24894 USB microcontroller
adjustable contrast yes
dimensions module size: 69 x 45 mm, display area: 60 x 31 mm (measured)
extra features IR-sensor; USB chip interfaces as USB keyboard and mouse (if an applicable remote-control is used); input and output ports (configurable)
supported since serdisplib 1.97.8, new features in 1.97.9
name in serdisplib "L4M132C"       (example: serdisp_init(sdcd, "L4M132C", ""); )

some images

[l4m132c testserdisp] [l4m132 rgb testpattern]
test image generated by testserdisp rgb test-pattern
[l4m132c testpattern w/ coloured numbers] [l4m132c animated testpattern]
coloured test-pattern with numbers test-pattern with animated bar
top ^

connecting an L4M132C USB display module:

intro

the L4M132C is a multifunctional USB device and may be driven either using the HID support provided by the operating system (linux only) or by using libusb.

libusb-support for this module is de-activated because of too many problems with the current implementation (there seem to be severe problems when using libusb together with cypress-chips on linux).
on linux, accessing the module using HID support is the better choice anyways.

ioctl HID (provided by the linux kernel)

nota bene
on some distributions, /dev/usb/hiddev0 is used instead of /dev/hiddev0
'HID:' can be omitted if the devicename starts with /dev/hiddev or /dev/usb/hiddev.
examples
configuration in lcd4linux
 Display SerDispLib {
   Driver 'serdisplib'
   Port 'HID:/dev/hiddev0'
   Model 'L4M132C'
 } 
configuration in graphlcd
 [serdisp]
 Driver=serdisp
 Device=HID:/dev/hiddev0
 Controller=l4m132c
calling test program testserdisp
 testserdisp -n l4m132c -p '/dev/hiddev0'
top ^

passing options through serdisp_init():

intro

using the third parameter of serdisp_init(), driver specific options and custom wiring can be set.
common information about passing options and customisable wiring can be found in a separate document.
    examples:
    
      serdisp_init(sdcd, "L4M132C", "INVERT=YES");
      serdisp_init(sdcd, "L4M132C", "ROTATE=90");
    

options

identifiershortremarkdefault
ROTATEROTrotate display (1 == 180 degrees)0
INVERTINVinvert display0
CONTRAST set display contrast5
POSTOFFMODEPOSTOFFaction after switching off library
  0 .. no action
  1 .. enable date/time display provided by the firmware 1)
0
RESMODE switch display resolution (0: 132x65, 1: 128x64)0
DEPTHCOLS, COLOURScolour depth (1: monochrome, 16: 64k colours)16
ALARMHOURALHOURalarm hour0
ALARMMINUTEALMINalarm minute0
ALARMDAYSALDAYSalarm days (bitmask: %X6543210: bit 6: saturday, bit 5: friday, ..., bit 0: sunday)0
FGCOLOURFGCOLOR,FGCOLonly if depth=1: foreground colour (format: 0xRRGGBB)0x000000
BGCOLOURBGCOLOR,BGCOLonly if depth=1: background colour (format: 0xRRGGBB)0xFFFFFF
BRIGHTNESS sets brightness of display (by dimming current contrast level)100
1) built-in RTC (real-time clock) is synchronised by the library before quitting.
 

ranges, aliases

identifierrangealiases
ROTATE0, 1, 90, 180, 270YES=180, NO=0, TRUE=180, FALSE=0
INVERT0, 1YES=1, NO=0, TRUE=1, FALSE=0
CONTRAST0 - 10 
POSTOFFMODE0, 1CLOCK=1
RESMODE0, 1132x65=0,128x64=1
DEPTH1, 16MONOCHROME=1,MONO=1,64k=16
ALARMHOUR0 - 23 
ALARMMINUTE0 - 59 
ALARMDAYS0 - 0x7FOFF=0,ALL=127
FGCOLOUR0x000000 - 0xFFFFFF 
BGCOLOUR0x000000 - 0xFFFFFF 
BRIGHTNESS0 - 100 
examples for alarm:
"alhour=23;almin=30;aldays=0x71"alarm at 23:30; 0x71 = %01110001 => alarm at saturday, friday, thursday, and sunday
"alhour=23;almin=30;aldays=all"alarm at 23:30; all= all days
"alhour=23;almin=30;aldays=0"alarm de-activated (because of alday=0)
top ^

tools

l4m132c_tool

this small utility is automatically compiled if serdisplib is configured with support for l4m-modules. it supports the following features:
  • changing the boot logo
  • setting date and time (using local date and time of host computer)
  • setting alarm
the utility can be found in tools/ after compiling the library.
nota bene
some options only work with recent firmware versions and/or modules with built-in RTC-chip!
usage:
  l4m132c_tool -p dev|port [<options>]
    -p dev|port      output device or port

  Options:
    -t               set date/time to local date/time
    -a  "HH:MM"      set alarm time
    -c  value        contrast/brightness (default: 5, value = [0, 10])
    -d "%6543210"    set alarm days (bit field, to be entered as hexadecimal or decimal)
                       bit 6: saturday   bit 5: friday
                       bit 4: thursday   bit 3: wednesday
                       bit 2: tuesday    bit 1: monday
                       bit 0: sunday
                     examples:
                       -d 0x7F: %1111111 -> all days
                       -d 0x41: %1000001 -> saturday and sunday
                       -d 0:    de-activate alarm
    -f imagefile     change bootlogo (only uncompressed BMP with depth=1 and 128x64 are accepted)
    -v               verbose (-v repeated: <= 2: log to syslog, >= 3: log to stderr, >= 5: log to stdout)
    -V               version information
   
  • BMP-files for boot logo must meet the following requirements:
    • Resolution: 128x64
    • Depth: 1 (only monochrome images accepted)
    • Uncompressed
examples:
  l4m132c_tool -p "/dev/hiddev0"                      # show bootlogo
  l4m132c_tool -p "/dev/hiddev0" -t                   # set date/time of display module
  l4m132c_tool -p "/dev/hiddev0" -c 0                 # set contrast/brightness to 0 (dark), set date/time, and quit
  l4m132c_tool -p "/dev/hiddev0" -f bootlogo.bmp      # change bootlogo
  l4m132c_tool -p "/dev/hiddev0" -a "23:30" -d 0x41   # set alarm at 23:30, saturday (bit6) and sunday (bit0)
  l4m132c_tool -p "/dev/hiddev0" -a "23:30" -d 0x7F   # set alarm at 23:30, all days
  l4m132c_tool -p "/dev/hiddev0" -a "23:30" -d all    # set alarm at 23:30, all days (all = alias for '0x7F')
  l4m132c_tool -p "/dev/hiddev0" -d 0                 # de-activate alarm
   
some images:
[l4m132c custom boot logo] [l4m132c clock modus]
custom bootlogo, uploaded with l4m132c_tool clock modus
top ^

links:

datasheets, product infos
digitaldevices.de home page of the creator of the module (german) http://www.digitaldevices.de
top ^

thanks:

special thanks go to
donating displays and a PSoC-programmer  *  www.digitaldevices.de
top ^

history:

2010-12-01 corrected typo (alday -> aldays)
2010-02-20 merging SVN documentation to main documentation
2009-12-12 (SVN:) introduction of non-linear contrast values; small changes
2009-04-26 (SVN:) 'l4m132c_tool': additional option '-c'
2009-04-24 (SVN:) added documentation for tool 'l4m132c_tool'
2008-07-31 first release
top ^

design by wolfgang astleitner, (C) 1998 - 2010