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
-
Open Windows Explorer and navigate to the CS subdirectory of the SerialLCDCS directory.
-
Double-click the SerialLCDCS.sln file to open it in Visual Studio.
-
From the Build menu, select Build Solution.
The application will be built in the default \bin or \bin\Debug subdirectory.
To run the sample
-
In Windows Explorer or in the Command Prompt window, navigate to the directory that contains the new executable file.
-
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.