Question:
Using C++ to read Serial Port?
1970-01-01 00:00:00 UTC
Using C++ to read Serial Port?
Four answers:
hyske
2016-10-25 17:45:44 UTC
allow's say it in any distinct case: a million. you've some enter from serial port. 2. at the same time as hitting any key, you get it; or you overlook about about it. (3. reveal/keep files is a trivial interest; allow's go away it at at time). If i have were given now no longer been incorrect, this may help you:
Rainer
2009-03-05 10:50:23 UTC
Sorry but you omitted the most important detail:

Which OS?



C++ on its own can't read from a serial port. It needs some kind of API. However different OS use different APIs.



If its Windows try

http://www.codeguru.com/cpp/i-n/network/serialcommunications/article.php/c5395



For LINUX/UNIX http://tldp.org/HOWTO/Serial-HOWTO.html



For DOS: use assembler :P
GibsonEssGee
2009-03-05 09:33:15 UTC
Easier using assembler but try http://www.sharewareconnection.com/windows-std-serial-comm-lib-for-c-c-.htm
justme
2009-03-05 10:22:19 UTC
does the PIC send alphanumeric characters only? If so, you can just use hyperterminal.



I have done a program that reads serial data, but I did it in visual C++, so I dont think the code would help.



P.S. never used DevCpp.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...