請先看『使用說明』
DPC Module:DPC under Windows
From LEXWiKi
(Difference between revisions)
PattyChen (Talk | contribs)
(New page: Category:AllowPages == DPC Module Spec == == The Sample code source you can download form == Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base...)
Next diff →
Revision as of 13:46, 6 April 2009
Contents |
DPC Module Spec
The Sample code source you can download form
Source file: DPCv2.4wSrc.rar
Binary file: DPC_v2.4w.rar
How to use the DEMO application
Image:DPC AP 1
Image:DPC AP 2
Image:DPC AP 3
Image:DPC AP 4
Image:DPC AP 5
- COM Port selection
- Open COM Port
- Close COM Port
- UP line message
- LOW line message
- UP line message send to LCM device
- LOW line message send to LCM device
- 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 LCM-Spec
