Controlling RS232
pvs
Posts: 6
When sending strings to a RS232 port to a device, should I wait until the device respond's !
How should I program it ?
How can control the incoming responds on a Rs232 port, example take a byte and evaluate it on bit level
How should I program it ?
How can control the incoming responds on a Rs232 port, example take a byte and evaluate it on bit level
0
Comments
Most devices fall under a specific category of how to handle. So is the data bursty, does it have a end of packet delimiter, does it send ascii with control codes, etc., etc. The short answer is it all depends on the device you are attempting to communicate with. I've been toying with writing a book on the concept.
Well it comes in as a string (array of chars) and you have to act upon the string.
There are certain functions used to manipulate the data.
If you want to extract bit information from a byte, then bitwise operators are your friend.
This is just a simple example to give you the flavor of what's involved. From a driver I recently wrote:
Good luck my friend!