Online: data transmission issues in the host computer for serial port communication. Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiNetwork/html/delphi_20061201145728217.html
Currently, a PC Controller for RS232 serial port switch Program, User requirements:
1. baud rate: 4800
2. Working Method: A Start bit with 0 to 8 Data digits, one stop bit with 1, a total of 10 digits
3. control Process: First, send data to the switch # 0aah; then send data to the switch #55 h; send a control word. The four digits are 0, and the four digits are control words, the sample control word is #55 h, indicating the fifth signal output.
If the switch has eight channels, how to write CodeTo control the switching between these channels? Use the Spcomm Control.
I feel very confused because I have never done anything in this area before. Thank you!
Up
Download the "Serial Port debugging assistant" here and check the source code. Try it on your own. You will surely find some gains.
Http://www.2ccc.com/search.asp? Keyword = Spcomm
Not very difficult.
Set the serial port properties, organize data by protocol, and send the data with writecommdata.
We recommend that you use comdrv32 with a demo.