Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 10 months ago.
Receive Data From Serial port And Use It In visual stdio[?]
Hi Again My Friends,
I Want To Learn C but now I want to learn about Serial port And I learn files..[txt or Dat] I need A Variable From Serial port in my program.
now I need a C language program to wait and Receive Data From Serial port And use it as a variable in
the program, And I want to run this program in Visual Studio and see the result And Work On it. !!!
anyone Can Help Me?
I do not have enough knowledge in C language
I do not know English very well And I am sorry For my Spelling Errors.
2 Answers
10 years, 9 months ago.
There should be plenty example programs for accessing the serial port in Visual Studio textbooks or on the Internet. Similar questions have been asked on this forum and some examples are given here by Jim Hamblen. You will find more hits by searching for "Visual Studio com port".
10 years, 9 months ago.
Hi Mohammad,
Using serial communication in a Windows program is pretty simple, but it might be hard if you have not programmed for Windows before.
This link explains the API windows uses for serial communication. Windows can be picky about what character encoding you use, and requires specific functions for each type (unicode, ansi, etc..), so keep that in mind when trying to run the example code.
Cheers!