![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2008
Posts: 2
Rep Power: 0
![]() |
We are writing an application which takes data from the serial port, more accurately from the serial port windows API. Data will be presented to the port sporadically and we intend capturing the data, but are unsure about what the best way to do this is? The data will arrive sporadically so I do not think polling
the port would be the best. Would it be better to wait for a character and then process the data character by character? Any thoughts? |
|
|
|
|
|
#2 |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 545
Rep Power: 4
![]() |
Re: Application using the serial port
your program will want to create another thread then have that thread wait for incomming data. If you read the description about serial ports in MSDN for CreateFile() function it will give you information about how to do that. Scroll down the page near the bottom to the section heading Communications Resources then follow the Communications link.
__________________
True Terror is to wake up one morning and discover that your high school class is running the country - Kurt Vonnegut Jr. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Serial Port Communication | hoffmandirt | C# | 3 | Sep 19th, 2007 3:38 PM |
| Serial Port communication | hbe02 | C++ | 3 | Aug 26th, 2006 2:30 PM |
| Serial Port Programming | Fatman | C++ | 4 | May 26th, 2006 4:14 PM |
| Data logging problem from the serial port | jerryleo | Perl | 0 | Jan 10th, 2006 7:47 AM |
| C programing control of the Serial Port. | Light | C++ | 5 | Feb 24th, 2005 2:14 PM |