Information Technology Reference
In-Depth Information
if (instatus & 0x02) return(BREAK_DETECTED);
:::: etc
} while (instatus!=0x01 );
return( (int) _inp(TXDATA) );
}
13.7 Notes from the author
Good old RS-232. My bank manager would certainly agree with this, as I have made more
consultancy income with it than any other piece of computer equipment. I have also run
more RS-232 training courses than all the trendy subjects areas (such as Java and C++) put
together (well, anyway, it doesn't take much to run a C++ course!). The reason for this is
because it is one of the least understood connections on computer equipment. I've interfaced
PCs to gas chromatographs (using an 8-port RS-232 card, heavy!), a PC to a VAX, a Sun
workstation to a PC, a PC to another PC, a Honeywell TDC to a PC, a PC to a PLC, and so
on. For most applications, a serial port to serial port connection is still the easiest method to
transfer data from one computer to another.
RS-232 is one of the most widely used 'standards' in the world. It is virtually standard on
every computer and, while it is relatively slow, it is a standard device. This over-rules its
slowness, its non-standardness, its lack of powerful error checking, its lack of address facili-
ties, and, well, need I go on. It shares its gold stars with solid performers, such as Ethernet
and the parallel port. Neither of these are star performers and are far from perfect, but they
are good, old robust performers who will outlast many of their more modern contenders.
When their position is challenged by a young contender, the standards agency simply invest
a lot of experience and brainpower to increase their performance. Who would believe that
the data rate, over copper wires, could be increased to 1 Gbps for Ethernet to 1MBps for RS-
422. One trusted piece of equipment I could have never done without is an RS-232 transmit-
ter/receiver. For this, I used an old 80386-based laptop computer (which weights as much as
a modern desktop computers) which ran either a simple DOS-based transmitter/receiver
program (see previous chapter), or the excellent Windows 3.1 Terminal program. These I
could use just as an electronic engineer would use a multimeter to test the voltages and cur-
rents in a circuit. A telltale sign that I was transmitting at the wrong bit rate or using an in-
correct number of data bits was the incorrectly received characters (but at least it was re-
ceiving characters, which was an important test).
On technical questions, I get more requests on RS-232 than any other technical area. I've
done a quick search of my emails, and here are my 'most requested' list:
1.
C++ student assignment problems (I seem to get more than my fair share of C++
problems from students, even although I don't actually teach the subject anymore, or
use it on any of my assignments). I must admit, I really didn't enjoy teaching pro-
gramming, as it allowed little scope for discussing interesting things.
2.
Coursework questions.
3.
Questions from students who are having problems with the PC they have at home.
4.
Examination questions (requests for past papers, problems with previous exam ques-
tions, and so on).
5.
Work-based problems (obviously sometimes universities provide better on-line ser-
vices than my company support services). These are typically related to problems with
networking.
Search WWH ::




Custom Search