aboutsummaryrefslogtreecommitdiffstats
path: root/README.MatrixOrbital
blob: a8e889cb24f3a5e7536019a20f90fa0d216bf6b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# $Id: README.MatrixOrbital,v 1.2 2000/03/22 07:33:50 reinelt Exp $
#

This is the README file for the MatrixOrbital display driver for lcd4linux

This driver supports the serial interface alphanumeric display modules by
Matrix Orbital Corporation (http://www.matrixorbital.com).

I could only test it with the LCD2041 model, but I think every other (LCD) model 
should work. These displays are supported:

  LCD0821: 2 lines by  8 characters
  LCD1621: 2 lines by 16 characters
  LCD2021: 2 lines by 20 characters
  LCD2041: 4 lines by 20 characters (tested)
  LCD4021: 2 lines by 40 characters

I could not test the vacuum fluorescent display models, but I think they should work, too.
There are no entries for this models in the driver table (at the bottom of MatrixOrbital.c),
but they could be easily added.

The displays come with an RS-232 and an I2C interface. The driver supports the RS-232 interface
only (because I have no idea how to find the I2C bus on my motherboard). 

Power can be applied either via an external DC power supply, a modified floppy power connector
(be aware that you can destroy your display if you get the pins wrong!) or via the RI (ring) 
signal of the RS-232 port. I choosed the latter, and modified a serial card so that it supplies 
+5V from the ISA bus to this pin (again, be aware that this is dangerous if you connect any other 
serial device to this modified port).

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 displays have a GPO (general purpose output), where you can connect a LED or something. 
The driver supports controlling this GPO, but this function is unused by now.


Configuration:

The driver needs/supports the following entries in lcd4linux.conf:

Display: a valid Matrix Orbital Display name (e.g. "LCD2041")
Port: serial device the display is attached to (e.g. /dev/ttyS2)
Speed: the baud rate from the display (configured via jumpers) must match 
       this value. Possible values are 1200, 2400, 9600 and 19200
Contrast: sets the LCD display contrast to a level between 0 (light) 
          and 256 (dark). Default value: 160
fc0; padding: 0 5px 0 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT([LCD4Linux],[0.9.12],[reinelt@eunet.at])
AC_CONFIG_SRCDIR([lcd4linux.c])
AM_INIT_AUTOMAKE(lcd4linux,0.9.12)
AM_CONFIG_HEADER(config.h)

# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_AWK
# Using `AC_PROG_RANLIB' is rendered 
# obsolete by `AC_PROG_LIBTOOL' :-(
AC_PROG_RANLIB
# Deactivating libtool for the moment until
# we find a way this beast works cleanly...
#AC_PROG_LIBTOOL
#AM_PROG_LIBTOOL

# Checks for libraries.
AC_CHECK_LIB(m, log)

# curses
sinclude(curses.m4)
AC_CHECK_CURSES

# Checks for X11
AC_PATH_XTRA

# check for gd.h
AC_CHECK_HEADERS(gd/gd.h gd.h, [has_gd=true], [has_gd=false])

# drivers
AC_MSG_CHECKING([which drivers to compile])
AC_ARG_WITH(
  drivers, 
  [  --with-drivers=<list>   compile driver for displays in <list>,]
  [                        drivers may be separated with commas,]	
  [                        'all' (default) compiles all available drivers,]	
  [                        drivers may be excluded with 'all,!<driver>',]	
  [                        (try 'all,\!<driver>' if your shell complains...)]	
  [                        possible drivers are:]	
  [                        BeckmannEgle, CrystalFontz, Cwlinux, HD44780,]
  [                        M50530, T6963, USBLCD, MatrixOrbital, PalmPilot]
  [                        PNG, PPM, X11, Text],
  drivers=$withval, 
  drivers=all
)

drivers=`echo $drivers|sed 's/,/ /g'`

for driver in $drivers; do

   case $driver in 
      !*) 
         val="no"
         driver=`echo $driver|cut -c 2-`
         ;;
       *) 
         val="yes"
         ;;
   esac
	
   case "$driver" in
      all)
         BECKMANNEGLE="yes"
         CRYSTALFONTZ="yes"
         CWLINUX="yes"
         HD44780="yes"
         M50530="yes"
         T6963="yes"
         USBLCD="yes"
         MATRIXORBITAL="yes"
         PALMPILOT="yes"
         PNG="yes"
         PPM="yes"
         TEXT="yes"
         X11="yes"
         ;;
      BeckmannEgle)
         BECKMANNEGLE=$val
         ;;
      CrystalFontz)
         CRYSTALFONTZ=$val
         ;;
      Cwlinux)
         CWLINUX=$val
         ;;
      HD44780)
         HD44780=$val
	 ;;
      M50530)
         M50530=$val
         ;;
      T6963)
         T6963=$val
         ;;
      USBLCD)
         USBLCD=$val
         ;;
      MatrixOrbital)
         MATRIXORBITAL=$val
         ;;
      PalmPilot)
         PALMPILOT=$val
         ;;
      PNG)
         PNG=$val
         ;;
      PPM)
         PPM=$val
         ;;
      SIN)
         SIN=$val
         ;;
      Skeleton)
         SKELETON=$val
         ;;
      Text)
         TEXT=$val
         ;;
      X11)
         X11=$val
         ;;
      *) 	
         AC_MSG_ERROR([Unknown driver '$driver'])
         ;;
   esac
done

AC_MSG_RESULT([done])

RASTER="no"
PARPORT="no"

if test "$BECKMANNEGLE" = "yes"; then
   DRIVERS="$DRIVERS BeckmannEgle.o"
   AC_DEFINE(WITH_BECKMANNEGLE,1,[junk])
fi

if test "$CRYSTALFONTZ" = "yes"; then
   DRIVERS="$DRIVERS Crystalfontz.o"
   AC_DEFINE(WITH_CRYSTALFONTZ,1,[junk])
fi

if test "$CWLINUX" = "yes"; then
   DRIVERS="$DRIVERS Cwlinux.o"
   AC_DEFINE(WITH_CWLINUX,1,[junk])
fi

if test "$HD44780" = "yes"; then
   PARPORT="yes"
   DRIVERS="$DRIVERS HD44780.o"
   AC_DEFINE(WITH_HD44780,1,[junk])
fi

if test "$M50530" = "yes"; then
   PARPORT="yes"
   DRIVERS="$DRIVERS M50530.o"
   AC_DEFINE(WITH_M50530,1,[junk])
fi

if test "$T6963" = "yes"; then
   PARPORT="yes"
   DRIVERS="$DRIVERS T6963.o"
   AC_DEFINE(WITH_T6963,1,[junk])
fi

if test "$USBLCD" = "yes"; then
   DRIVERS="$DRIVERS USBLCD.o"
   AC_DEFINE(WITH_USBLCD,1,[junk])
fi

if test "$MATRIXORBITAL" = "yes"; then
   DRIVERS="$DRIVERS MatrixOrbital.o"
   AC_DEFINE(WITH_MATRIXORBITAL,1,[junk])
fi

if test "$PALMPILOT" = "yes"; then
   DRIVERS="$DRIVERS PalmPilot.o"
   AC_DEFINE(WITH_PALMPILOT,1,[junk])
fi

if test "$PNG" = "yes"; then
   if test "$has_gd" = "true"; then
      RASTER="yes"
      AC_DEFINE(WITH_PNG,1,[junk])
      DRVLIBS="$DRVLIBS -lgd"
   else
      AC_MSG_WARN(gd.h not found: PNG driver disabled)
   fi
fi

if test "$PPM" = "yes"; then
   if test "$has_gd" = "true"; then
      RASTER="yes"
      AC_DEFINE(WITH_PPM,1,[junk])
   else
      AC_MSG_WARN(gd.h not found: PNG driver disabled)
   fi
fi

if test "$SIN" = "yes"; then
   DRIVERS="$DRIVERS SIN.o"
   AC_DEFINE(WITH_SIN,1,[junk])
fi

if test "$SKELETON" = "yes"; then
   DRIVERS="$DRIVERS Skeleton.o"
   AC_DEFINE(WITH_SKELETON,1,[junk])
fi

if test "$TEXT" = "yes"; then
   if test "$has_curses" = true; then
      DRIVERS="$DRIVERS Text.o"
      DRVLIBS="$DRVLIBS $CURSES_LIBS"
      CPPFLAGS="$CPPFLAGS $CURSES_INCLUDES"
      AC_DEFINE(WITH_TEXT,1,[junk])
   else
      AC_MSG_WARN(curses not found: Text driver disabled)
   fi   
fi

if test "$X11" = "yes"; then
   if test "$no_x" = "yes"; then
      AC_MSG_ERROR(X11 headers or libraries not available: X11 driver disabled)
   else
      DRIVERS="$DRIVERS XWindow.o"
      DRVLIBS="$DRVLIBS -L$ac_x_libraries -lX11"
      AC_DEFINE(WITH_X11,1,[junk])
   fi
fi

if test "$DRIVERS" = ""; then
   AC_MSG_ERROR([You should include at least one driver...])
fi
   
# Raster.o depends on PPM or PNG
if test "$RASTER" = "yes"; then
   DRIVERS="$DRIVERS Raster.o"
fi

# parport driver
if test "$PARPORT" = "yes"; then
   DRIVERS="$DRIVERS parport.o"
fi

AC_SUBST(DRIVERS)
AC_SUBST(DRVLIBS)

# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h])
AC_CHECK_HEADERS(sys/io.h asm/io.h)
AC_CHECK_HEADERS(linux/parport.h linux/ppdev.h)
AC_CHECK_HEADERS(linux/dvb/frontend.h)
AC_CHECK_HEADERS(net/if_ppp.h)
AC_CHECK_HEADERS(asm/msr.h)

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_TYPE_UID_T

# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_PROG_GCC_TRADITIONAL

#removed for uClibc compatibility
#AC_FUNC_MALLOC
#AC_FUNC_REALLOC

AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([atexit dup2 gethostbyname gettimeofday memset putenv select socket strcasecmp strncasecmp strchr strdup strerror strpbrk strrchr strstr strtol uname])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT