471,349 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

Programming for RS-485 serial communication

All examples @ MS website for serial port communication are specifically
indicated for RS-232 interface, such as:

http://msdn.microsoft.com/netframewo...alComm/TOC.ASP

http://www.microsoft.com/downloads/d...displaylang=en

Would these same examples work with RS-485 port w/o change? If code
modifications are required, what specific things should I look for? I'd
appreciate any directions. Thanks.

Quan
Jul 21 '05 #1
2 2785
Would these same examples work with RS-485 port w/o change? If code
modifications are required, what specific things should I look for? I'd
appreciate any directions. Thanks.


There may be some slight changes required. RS-485 defines the physical
interface (electrical and mechanical). The software side doesn't know
anything about the physical part of the interface.

You can use the class to implement any software interface that your system
needs. The connected devices will define what you need to do in that area
(there aren't any standards, though there are "standard approaches"). I have
some information on this in my book, and there are online resources, too.
For example, B&B Electronics has an online essay on RS-485.

The actual RS-485 adapter that you are using may require that you manipulate
RTS (and monitor CTS) in code for transmit and receive control. Some
adapters have this funtion built-in, so all that you have to do is to send
and receive. What you do depends on what you are using. And, as I mentioned
above, the actual protocol that you implement in code will depend on the
demands of your connected device.

Dick

Richard Grier (Microsoft MVP - Visual Basic)
Hard & Software
12962 West Louisiana Avenue
Lakewood, CO 80228
303-986-2179 (voice)
303-593-9315 (fax)

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. For faster
service, contact the publisher at http://www.mabry.com/vbpgser4.
Jul 21 '05 #2
The B&B Electronics resource is really helpful for serial port basics. I will
need to study both devices to further understand their requirements in data
transfer protocol and timing.

Thanks.

Quan
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by bajopalabra | last post: by
25 posts views Thread by dixie | last post: by
8 posts views Thread by gevayl | last post: by
4 posts views Thread by Wayne M J | last post: by
4 posts views Thread by Finger.Octopus | last post: by
3 posts views Thread by =?Utf-8?B?QS4gUm9iaW5zb24=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.