Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Samples
Application Samples
 Serial Communication Application Sa...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:

Want more? Here are some additional resources on this topic:

.NET Framework Samples 
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.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker