Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comm port question

Status
Not open for further replies.

OzzieGeorge

Programmer
Jan 14, 2005
2,611
AU
I have got a simple comms package working but at present I have to get each character one at a time using input and in order to know when I have got all I need I have to test for known characters or stings of characters. I don't believe this is the best way of dealing with this and was wondering if anyone knew of a way to use handshaking and the Oncomm event possibly using CTS to know when the other end has finished sending and then grab the entire string from the buffer? I'm using MScomm for the comms by the way.
 
Have a look here:
thread707-560230

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV

Thanks but if you look towards the end of that post you will learn where I found out how to get one character at a time! I'm trying to move to an event triggered way of getting the data as the one character at a time is slow and laborious. I believe the CTS changes when the far end finishes sending and I need to work out how to get the oncomm event to trigger to that because then the entire string will be in the buffer and I should be able to get it all at once.
 
I seem to have pinned it down to the possibility that the CTS is being suppressed as the oncomm event will fire for the dtr change and if I set the threshold low enough is fires for data recieved. I just can't get any change in CTS. Does anybody know if there is a setting which enables this or for that matter disables it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top