RS485 Module under WinCE

From LEXWiKi

Revision as of 18:35, 17 March 2010 by Steve (Talk | contribs)
Jump to: navigation, search


Note:this source code and binary only suppor RS485 test on VIA series motherboard

Contents

The Sample code source you can download from

   Source file: RS485_Src_CE.rar
   Binary file: RS485_Bin_CE.rar

How to use this Demo Application

Image:RS485.jpg

1.Selcet RS485 com port and Rts Signal Control ,Click Open.
2. Put some message in editbox and then press send button
3.Click Recive button and than the message will display in editbox.
4.click AutoFlow if you want to test flowcontrol.

Sample code Introduction

Create Com Port

   bool CreatCom(CString Com_Str,DWORD Send_buf,DWORD Rec_buf,int flow_control)

Parameters
Com_Str: The name of COM port to be created
Send_buf:Setting Send buffer
Rec_buf: Setting Recive buffer
flow_control:flow control flag :1(on) or 0(off)

Setting Com port

   bool SetCom(int rate, BYTE ByteSize, TCHAR parity, TCHAR stopbit, int rtsflag)

Parameters

Personal tools