SvnDriverLfourmonethreetwoc

linux4media L4M132C additional functionality

the new features for the linux4media l4m132c display module have been merges into stable release serdisplib 1.97.9.

download latest version of serdisplib.

documentation can now be found in the project pages of serdisplib: linux4media l4m132c usb colour display module.

the SVN documentation below is left for historical purposes and will not be maintained any longer.


disclaimer / info

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 outputting serdisplib generated output using linux4media L4M132C
  • i'm not responsible for the content of external web pages
  • english is not my native language. please keep that in mind (corrections of english grammar and formulations are very welcome!)
  • use the most recent SVN versions (trunk (1.97.x) or 1.98.x-branch) to test this driver

description

some options have been added to L4M132C which add more functionality to this 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)
  • in SVN r261 (both trunk and branch) an improved, non-linear way of setting display contrast has been introduced (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.

additional options

identifier
short
remark
default

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
ALDAY
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

note

aliases BG and FG (introduced in r228) had to be removed in r233 because BG would have been ambiguous (BG is an alias for BACKLIGHT).

ranges, aliases

identifier
range
aliases

RESMODE
0, 1
132x65=0,128x64=1

DEPTH
0, 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;alday=0x71"
alarm at 23:30; 0x71 = %01110001 => alarm at saturday, friday, thursday, and sunday

"alhour=23;almin=30;alday=all"
alarm at 23:30; all= all days

"alhour=23;almin=30;alday=0"
alarm de-activated (because of alday=0)

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

http://serdisplib.sourceforge.net/ser/images/l4m132c_custombootlogo.jpg http://serdisplib.sourceforge.net/ser/images/l4m132c_displayclock.jpg

  • first image: custom bootlogo, uploaded with l4m132c_tool
  • second image: clock modus

history

  • 2009-12-12: introduction of non-linear contrast values; small changes
  • 2009-04-26: 'l4m132c_tool': additional option '-c'
  • 2009-04-24: added documentation for tool 'l4m132c_tool'
  • 2009-04-19: first release of documentation

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.