Online: data transmission issues in the host computer for serial port communication.

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.