Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Serial Port communication (http://www.programmingforums.org/showthread.php?t=11180)

hbe02 Aug 26th, 2006 7:13 AM

Serial Port communication
 
For the record, im using C++.NET , visual studio.net 2003 and windows XP.
I want to connect the PC's serial port to a PIC microchip and write a program that sends bytes of 1's or 0's to the microchip through the serial port.
Now i have searched the forum and found this post:
http://www.programmingforums.org/for...ht=serial+port
im looking for something like post numer 14. which Arevos had in C# should be applicable to C++.net since they have a common lang. interface. but my search on MSDN to find such a class failed, maybe im using the wrong keywords.? all i find is win32 port, but i dont think this is what im looking for. can ya'll guide me to what class to use? in which library is it contained? any samples would be great...
Thanks

grumpy Aug 26th, 2006 10:32 AM

This isn't really a C++ problem; you need to use the win32 API.

This link provides an example (in C++, not C++.net) of using the win32 API to read and write from serial ports. Not exactly the canned solution you're looking for but can presumably be adapted....

Polyphemus_ Aug 26th, 2006 12:01 PM

You mean http://msdn2.microsoft.com/en-us/lib...erialport.aspx?

hbe02 Aug 26th, 2006 3:30 PM

I couldnt find anything on the serial Port because i had the 1.1 version of the .NEt framework and this class is a recent addition in the 2.0 framework as illustrated in Polyphemus's link..
I am downloading the 2.0 version now, so will be learning more on the class soon. thanks grumpy and Polyphemus.. documentation on links are very usefull..


All times are GMT -5. The time now is 12:58 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC