LCM Module:LCM under Windows

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
(Sample code Introduction)
Current revision (13:35, 25 February 2022) (edit) (undo)
(The Sample source code you can download from)
 
(13 intermediate revisions not shown.)
Line 1: Line 1:
[[Category:AllowPages]]
[[Category:AllowPages]]
-
== The Sample code source you can download form ==
+
== LCM Module Spec ==
-
Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/LCM_release/Win_base/LCD_CTLv14_w_src.rar LCD_CTLv14_w_src.rar]
+
LCM Module spec and command list :
-
Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/LCM_release/Win_base/LCD_CTLv14_w.rar LCD_CTLv14_w.rar]
+
<Google Drive>[https://drive.google.com/file/d/1WbvPdGz_ATad_g5GzF8IDlasI-hzwDZC/view?usp=sharing LCM-Spec]
 +
 
 +
<FTP>[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/LCM_release/SCS02002R0LEW--ENGLISH.pdf LCM-Spec]
 +
 
 +
== The Sample source code you can download from ==
 +
 
 +
<Google Drive>
 +
 
 +
Source file: [https://drive.google.com/file/d/1wjRO_lol8fPOQrJgNG6PowdtT7BHwKVG/view?usp=sharing LCD_CTLv15_w_Src]
 +
 
 +
Binary file: [https://drive.google.com/file/d/1NLDIiowMmlkwBP_wQAQPZWPkXbyKk2pS/view?usp=sharing LCD_CTLv15_w_Bin]
 +
 
 +
<FTP>
 +
 
 +
Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/LCM_release/Win_base/LCD_CTLv15_w_src.rar LCD_CTLv15_w_Src]
 +
 
 +
Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/LCM_release/Win_base/LCD_CTLv15_w.rar LCD_CTLv15_w_Bin]
== How to Switch functions ==
== How to Switch functions ==
Line 54: Line 70:
sprintf(szSend+3, "%s\r", m_Sendmsg2);
sprintf(szSend+3, "%s\r", m_Sendmsg2);
m_SerialPort.WriteToPort(szSend); //Write command and message to LCM device
m_SerialPort.WriteToPort(szSend); //Write command and message to LCM device
 +
 +
===LCM Command list===
 +
Please check the page6 in spec file ,you can download form <Google Drive> [https://drive.google.com/file/d/1WbvPdGz_ATad_g5GzF8IDlasI-hzwDZC/view?usp=sharing LCM-Spec] / <FTP> [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/LCM_release/SCS02002R0LEW--ENGLISH.pdf LCM-Spec]

Current revision

Contents

LCM Module Spec

LCM Module spec and command list :

<Google Drive>LCM-Spec

<FTP>LCM-Spec

The Sample source code you can download from

<Google Drive>

Source file: LCD_CTLv15_w_Src

Binary file: LCD_CTLv15_w_Bin

<FTP>

Source file: LCD_CTLv15_w_Src

Binary file: LCD_CTLv15_w_Bin

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

Function:
Image:LCM_RS232.JPG

TTL Function:
Image:LCM_TTL.JPG

How to use the DEMO application

Image:LCM_AP.jpg

  1. COM Port selection
  2. Open COM Port
  3. Close COM Port
  4. UP line message
  5. LOW line message
  6. UP line message send to LCM device
  7. LOW line message send to LCM device
  8. Check LCM all pixel work

Sample code Introduction

Open COM Port Device

In Sample code /LCD_CTLDlg.cpp lin 157

  if(m_SerialPort.InitPort(this,nPort,9600,'N',8,1,EV_RXFLAG|EV_RXCHAR,512)) //Set LCM to 9600.n.8.1
  {
  m_SerialPort.StartMonitoring(); //Open Com port monitoring
  m_bSerialPortOpened=TRUE; //Set COM port open 
  }

Close COM Port Device

In Sample code /LCD_CTLDlg.cpp lin 171

  m_SerialPort.ClosePort(); //Set COM port close
  m_bSerialPortOpened=FALSE;

Send the UP line message to LCM Device

In Sample code /LCD_CTLDlg.cpp lin 183

  if(!m_bSerialPortOpened) return; //check the com port was open
  UpdateData(TRUE);
  char szSend[30] = {0x1b, 0x51, 0x41}; //0x1b , 0x51 ,0x41 for LCM send UPline command
  sprintf(szSend+3, "%s\r", m_Sendmsg);
  m_SerialPort.WriteToPort(szSend); //Write command and message to LCM device

Send the LOW line message to LCM Device

In Sample code /LCD_CTLDlg.cpp lin 215

  UpdateData();
  char szSend[30] = {0x1b, 0x51, 0x42}; //0x1b , 0x51 ,0x42 for LCM send LOWline command
  sprintf(szSend+3, "%s\r", m_Sendmsg2);
  m_SerialPort.WriteToPort(szSend); //Write command and message to LCM device

LCM Command list

Please check the page6 in spec file ,you can download form <Google Drive> LCM-Spec / <FTP> LCM-Spec

Personal tools