I am using Visual C# in vista and I would like to know how to access the serial port to control LED's on a microcontroller. I would like something basic to get me started.How do I access the serial port on my computer with C# and control a microcontroller?
You're going to need to write your own driver with something more powerful than C# -- C and some assembly. Google ';Microsoft DDK'; or ';Windows Driver Kit';. Once you have the driver, you can access it with C#, VB, VC++, etc.
You can also use pre-written drivers (by buying a kit and using the one they supply)How do I access the serial port on my computer with C# and control a microcontroller?
Check out the .NET SerialPort class, System.IO.Ports.SerialPort. You can find it in the toolbox of your Visual Studio Windows Forms project.
There are dlls you can find on the web that will access the serial port driver (you can't access hardware directly in Windows).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment