Article Preview
Buy Now
| Print: | |
| PDF: |
Feature
Advanced Serial Programming
Tips and tricks to get the most out of your connections
Issue: 3.4 (March/April 2005)
Author:
by Aaron Ballman
Author Bio: Contrary to popular beliefs, Aaron gets let out of the Cave of Networking once in a while so he can work on Serial programming projects. While out of his cave, he likes to find new ways he can re-program his pickup truck using REALbasic's Serial control.
Article Description: No description available.
Article Length (in bytes): 8,784
Starting Page Number: 14
RBD Number: 3409
Resource File(s): None
Related Link(s): None
Known Limitations: None
Excerpt of article text...
When we left off last time, you had just started writing your own serial applications using the Serial control in REALbasic. You learned about all the basics of serial programming and the general structure of a serial application. In this article, you're going to learn some of the more advanced topics about serial programming.
For the most part, your applications will be communicating from a computer (a DTE) to a device of some sort (a DCE). But what happens when you want to communicate from one computer to another? Well, if you've ever tried this on your own, you'll notice that you can't just use a regular serial cable to do the communications. This is because of the way a serial cable is wired. If you think about it logically, the line that the computer uses to send the data (the TXD line) is the same line that the serial device uses to retrieve data (the RXD line). But, if you're hooking a computer to another computer, then the TXD line on one side is still the TXD line on the other side -- how is the other computer supposed to receive the data when you're sending it? Simple! You need to use a device called a null modem, also known as a cross-over cable. In this case, the wire pairs are swapped so that the TXD line from one machine switches into the RXD line. This way, the line pairs all match up the way they're supposed to. Without using a null modem, you cannot get one computer to talk to another via a serial cable.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|








