Appendix D:Programming the LCMThe LCD panel module (LCM) is designed to providereal-time operating status and configuration informationfor the system. For sample LCM code, see LCM foler inthe Driver and Manual CD. The driver and the programlibrary can also be found in the folder.The system supports the following 2 kinds of LCM:Parallel Text-based LCM: The LCM connects to the•motherboard’s parallel port. The LCD screen candisplay 2 lines, 16 (or 20) characters per line.USB and Serial Text or Graphic-based LCM: Our next•generation LCM. Lanner engineers design a commonsource code to be deployed on these two differentlyinterfaced LCM modules. Jumpers are used to selectbetween text and graphic types. See next section.For Parallel Text-based LCMBuildTo build program source code on Linux platform, pleaseuse the following steps as a guideline:1. Extract the source file:# tar -xzvf plcm_drv_v0XX.tgz(0XX is the version of the program.)2. Change directory to the extracted folder:# cd plcm_drv_v0XX(0XX is the version of the program.)Note: Apply our Parallel Text-based LCM to theenvironment of virtualization, please use the version 013or above of the program.3. Type make to build source code:# makeAfter compiling, the executable programs (plcm_test,plcm_cursor_char, ppdev_test, Test) and the driver(plcm_drv.ko) will appear in the program’s folder.Note: The OS supported by Parallel Text-based LCMfunction includes platforms based on Linux Kernel series2.4.x, Linux Kernel series 2.6.x and Linux Kernel series3.0.x or above.InstallInstall the driver and create a node in the /dev directoryby:#insmod plcm_drv.ko#mknod /dev/plcm_drv c 248 0Note:If you cannot install the driver,check whether you have enabled theparallel port in the BIOS setting .Once the message of “insmod: errorinserting ‘plcm_drv.ko’: -1 Input/outputerror” appears, please check that whetherthe major number is repeated or not.The major number needed with themknod command varies with differentsoftware versions; please look upthe Readme file for this value.ExecuteThis section contains sample executable programs thatyou could test on your platform. It demonstrates someuseful functionality that the LCM provides. Note that theinstallation needs to be completed before proceedingwith these executions.To execute, run the command:#./plcm_testBacklight Off/On turning off/on the backlight of theLCM displayDisplay Off turning off the LCM displayCursor Off/On NOT showing/showing the cursor on theLCM displayBlinking off/On turning off/on the cursor blinkingWriting “Lanner@Taiwan” displaying the specificsentencesReading “Lanner@Taiwan” reading the specific sentenceCGram Test displaying the user-stored charactersKeypad Testing Get the keypad input: the 1st button isread in as Left, the 2nd button is read in as Up, the 3rdbutton is read in as Right, and the 4th button is read in asDown)