Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 1st, 2008, 11:31 AM   #1
neil.hornby
Newbie
 
Join Date: Jun 2008
Posts: 2
Rep Power: 0 neil.hornby is on a distinguished road
Post Application using the serial port

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?
neil.hornby is offline   Reply With Quote
Old Jun 1st, 2008, 11:37 PM   #2
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 529
Rep Power: 4 Ancient Dragon is on a distinguished road
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.
__________________
I Like Ike. Vote for Dwight Eisenhower this November.
--This message brought to you by the the Procrastinators Club Of America.
Ancient Dragon is online now   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:49 PM.

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