請先看『使用說明』
LCM Module:LCM under Linux
From LEXWiKi
(Difference between revisions)
(→Send the UP line message to LCM Device) |
(→Send the LOW line message to LCM Device) |
||
Line 46: | Line 46: | ||
In Sample code /LCD_CTLDlg.cpp lin 16 and 66 | In Sample code /LCD_CTLDlg.cpp lin 16 and 66 | ||
char lowline[C32]={0x1b,0x51,0x42}; //for LCM LOW line command | char lowline[C32]={0x1b,0x51,0x42}; //for LCM LOW line command | ||
- | + | text = gtk_entry_get_text(GTK_ENTRY(entry)); | |
sprintf(lowline+3,"%s\r",message); | sprintf(lowline+3,"%s\r",message); | ||
PortSend(fdcom, lowline, C32); //Send the message to LOW Line | PortSend(fdcom, lowline, C32); //Send the message to LOW Line | ||
+ | |||
===LCM Command list=== | ===LCM Command list=== | ||
Please check the page6 in spec file ,you can download form [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/LCM_release/SCS02002R0LEW--ENGLISH.pdf LCM-Spec] | Please check the page6 in spec file ,you can download form [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/LCM_release/SCS02002R0LEW--ENGLISH.pdf LCM-Spec] |
Revision as of 17:17, 27 April 2009
Contents |
LCM Module Spec
LCM Module spec and command list :LCM-Spec
The Sample code source you can download form
Source file: LCM_src_v11.tar.gz
Binary file: LCM_v11.tar.gz
How to Switch functions
Our LCM module can support TTL and RS232 type,Please make sure your serial port support type,
And switch LCM JUMP as below picture!!
How to use the DEMO application
- COM Port selection
- Confirm COM Port select
- Upline message enter
- Upline message send
- Clear upline
- Lowline message enter
- Lowline message send
- Clear lowline
Sample code Introduction
Open COM Port Device(COM1~COM4)
portinfo_t portinfo1 ={'0' , 9600 , '8', '0' , '0' , '0' , '0' , '0' , '1' , 0 }; portinfo_t portinfo2 ={'0' , 9600 , '8', '0' , '0' , '0' , '1' , '0' , '1' , 0 }; portinfo_t portinfo3 ={'0' , 9600 , '8', '0' , '0' , '0' , '2' , '0' , '1' , 0 }; portinfo_t portinfo4 ={'0' , 9600 , '8', '0' , '0' , '0' , '3' , '0' , '1' , 0 }; //Default tty:COM2
Send the UP line message to LCM Device
In Sample code /LCD_CTLDlg.cpp lin 15 and 58
char upline[C32]={0x1b,0x51,0x41}; //for LCM UP line command text = gtk_entry_get_text(GTK_ENTRY(entry)); sprintf(upline+3,"%s\r",message); PortSend(fdcom, upline, C32); //Send the message to LCM
Send the LOW line message to LCM Device
In Sample code /LCD_CTLDlg.cpp lin 16 and 66
char lowline[C32]={0x1b,0x51,0x42}; //for LCM LOW line command text = gtk_entry_get_text(GTK_ENTRY(entry)); sprintf(lowline+3,"%s\r",message); PortSend(fdcom, lowline, C32); //Send the message to LOW Line
LCM Command list
Please check the page6 in spec file ,you can download form LCM-Spec