Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Serial Communication Application Sample 

Download sample

This sample demonstrates serial communications with a serial LCD device. This sample is available only in Visual C#.

For information about using the samples, see the following topics:

To build the sample using Visual Studio

  1. Open Windows Explorer and navigate to the CS subdirectory of the SerialLCDCS directory.

  2. Double-click the SerialLCDCS.sln file to open it in Visual Studio.

  3. From the Build menu, select Build Solution.

The application will be built in the default \bin or \bin\Debug subdirectory.

To run the sample

  1. In Windows Explorer or in the Command Prompt window, navigate to the directory that contains the new executable file.

  2. Double-click the icon for the SerialLCDCS file in Windows Explorer, or type SerialLCDCS in the Command Prompt window to open the application.

Remarks

This sample requires a LCD device, but if you do not have a device the code is still demonstrative of the following:

  • Declaring an instance of a SerialPort.

  • Reading and writing to the port.

  • Controlling the communication protocol with the device.

  • Closing the port.

Community Additions

ADD
Show:
© 2015 Microsoft