Appendix C:
Programming the LCM
The LCD panel module (LCM) is designed to provide
real-time operating status and configuration information
for the system. For sample LCM code, see
LCM
foler in
the
Driver and Manual CD
. The driver and the program
library can also be found in the folder.
The system supports the following type of LCM:
Parallel Text-based LCM: The LCM connects to the
•
motherboard’s parallel port. The LCD screen can
display 2 lines, 20 characters per line.
Parallel Text-based LCM
Build
To build program source code on Linux platform, use the
following steps as a guideline:
Copy the proper makefile from the Driver and Manual
1.
CD to your system: Makefile.linux
Type make to build source code:
2.
make Makefile (Note: omit the file extensions)
After compiled, the executable programs
(plcm_test,
plcm_cursor_char, Test) and the driver (plcm_drv.ko or
plcm_drv.o) will appear in the program’s folder.
Note:
The OS supported by Lanner Bypass
function include platforms based on Linux
Kernel series 2.4.x and Linux Kernel series 2.6.x.
Install
Install the driver and create a node in the /dev directory
by:
#insmod plcm_drv.ko
#mknod /dev/plcm_drv c 241 0
Note: If you cannot install the driver,
check whether you have enabled the
parallel port in the BIOS setting
.
Execution
This section contains sample executable programs that
you could test on your platform. It demonstrates some
useful functionality that the LCM provides.
To execute, type:
#./plcm_test:
This program runs through the following
functions in sequence:
Backlight Off/On
(turning off/on the backlight of the
LCM display)
Display Off/On
(turning off /on the LCM display)
Cursor Off/On
(NOT showing/showing the cursor on the
LCM display)
Blinking off/On
(turning off/on the cursor blinking)
Writing Lanner@Taiwan
(displaying the specific
sentences)
Reading Lanner@Taiwan
(reading the specific sentence)
CGram Test
(displaying the user-stored characters)
Keypad Testing
(Get the keypad inuput: the 1st button
is read in as left, the 2nd buttonis read in as up, the 3rd
button is read in as down, and the 4th button is read in
as right)
Plcm_cursor_char:
This program provides a menu to
demonstrate the following functions:
Insert line
(set the starting line to either line 1 or line 2)
Move Cursor right
(select to move the cursor to the
right)
Move Cursor Left
(select to move the cursor to the left)
Add a char
(select to display a character on the LCM
screen)
Clear
(select to clear the LCM display)
Leave
(select to leave the program)
To execute, type:
#./ plcm_cursor_char
Note: For descriptions of the command,
refer to the Readme
file contained
within the program’s folder.
Summary of Contents for FW-8759
Page 25: ......