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.
- this page deals with connecting a linux4media l4m132c usb colour display module to an usb port and drive it using
serdisplib
- i'm not responsible for the content of external web pages
- external web pages will generally open in separate browser windows or tabs
- english is not my native language. please keep that in mind (corrections of english grammar and formulations are very welcome!)
- email: mrwastl at users.sourceforge.net
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.
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.
the package that was sent to me contained the following items:
the USB module can be extended to support the following features:
the USB module registers with three USB interfaces when connected to a UNIX system:
|
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
test image generated by testserdisp |
rgb test-pattern |
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)
- the display-part of the USB module is assigned to the HID support of the operating system and can be controlled using ioctl-calls
- the device name that is assigned to the display interface is
/dev/hiddev
X or/dev/usb/hiddev
X. - using udev or hotplug, permissions can be assigned to the device to give access to non-root users
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 lcd4linuxDisplay SerDispLib { Driver 'serdisplib' Port 'HID:/dev/hiddev0' Model 'L4M132C' }configuration in graphlcd[serdisp] Driver=serdisp Device=HID:/dev/hiddev0 Controller=l4m132ccalling test program testserdisptestserdisp -n l4m132c -p '/dev/hiddev0'
top ^
passing options through serdisp_init():
intro
using the third parameter of
common information about passing options and customisable wiring can be found in a separate document.
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
identifier | short | remark | default |
---|---|---|---|
ROTATE | ROT | rotate display (1 == 180 degrees) | 0 |
INVERT | INV | invert display | 0 |
CONTRAST | set display contrast | 5 | |
POSTOFFMODE | POSTOFF | action 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 | |
DEPTH | COLS, COLOURS | colour depth (1: monochrome, 16: 64k colours) | 16 |
ALARMHOUR | ALHOUR | alarm hour | 0 |
ALARMMINUTE | ALMIN | alarm minute | 0 |
ALARMDAYS | ALDAYS | alarm days (bitmask: %X6543210: bit 6: saturday, bit 5: friday, ..., bit 0: sunday) | 0 |
FGCOLOUR | FGCOLOR,FGCOL | only if depth=1: foreground colour (format: 0xRRGGBB) | 0x000000 |
BGCOLOUR | BGCOLOR,BGCOL | only if depth=1: background colour (format: 0xRRGGBB) | 0xFFFFFF |
BRIGHTNESS | sets brightness of display (by dimming current contrast level) | 100 |
ranges, aliases
identifier | range | aliases |
---|---|---|
ROTATE | 0, 1, 90, 180, 270 | YES=180, NO=0, TRUE=180, FALSE=0 |
INVERT | 0, 1 | YES=1, NO=0, TRUE=1, FALSE=0 |
CONTRAST | 0 - 10 | |
POSTOFFMODE | 0, 1 | CLOCK=1 |
RESMODE | 0, 1 | 132x65=0,128x64=1 |
DEPTH | 1, 16 | MONOCHROME=1,MONO=1,64k=16 |
ALARMHOUR | 0 - 23 | |
ALARMMINUTE | 0 - 59 | |
ALARMDAYS | 0 - 0x7F | OFF=0,ALL=127 |
FGCOLOUR | 0x000000 - 0xFFFFFF | |
BGCOLOUR | 0x000000 - 0xFFFFFF | |
BRIGHTNESS | 0 - 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
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:
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 ^
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 ^