28.12.2013 Views

Serial Programming - upload.wikimedia....

Serial Programming - upload.wikimedia....

Serial Programming - upload.wikimedia....

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Software Examples<br />

• <strong>Serial</strong> Networks<br />

• Packet Challenge/Verification<br />

• Basic <strong>Serial</strong> Packets<br />

• 8250 UART processing<br />

• Raw RS-232 Signals<br />

In the case of many serial data applications, not all of these layers are implemented. Often<br />

it is just raw packets being transmitted in one direction, but sometimes even just a signal<br />

of any kind can indicate some action take place on a computer, regardless of content. It is<br />

possible to simply take the logic level of a raw RS-232 signal in your software, but at some<br />

point the data does need to be converted and the voltages involved with RS-232 can damage<br />

hardware, so this is very seldom done.<br />

1.4 Software Examples<br />

I don't want to get into a holy war over programming languages with this series of articles.<br />

For the moment, I'm going to be using Turbo Pascal and Delphi as the programming<br />

languages, if for no other reason then the fact that I am most comfortable programming<br />

in this development environment. If a good C/C++ guru would like to "translate" these<br />

routines, I would welcome that, as well as other programming languages where applicable.<br />

<strong>Serial</strong> communication is complicated enough so please avoid esoteric languages like Intercal<br />

or Malbolge. A good BASIC implementation would be welcome, as would LISP. I'll try to<br />

avoid language-specific features and simply deal with functions in a generic sense, which<br />

good programmers should be able to translate to the language of their choice.<br />

These articles are meant to teach you the basics of serial data communication, not to be a<br />

functioning serial data driver. Still, all code examples will be checked and sent through an<br />

actual compiler before being listed in the articles, and hopefully fully debugged. There is no<br />

one single way to accomplish these steps and tasks, so I am going to encourage a hands-on<br />

approach to dealing with software and setting up networks.<br />

While I've had quite a bit of experience in dealing with several serial data protocols (on<br />

the packet level), I am by no means the topmost expert at this. As I said earlier, I have<br />

considerable experience in dealing with communications at many levels, and I'd like to share<br />

some of my very hard-won knowledge.<br />

1.5 Applications in Education<br />

While I am only a Software Engineer and don't have the "formal" credentials necessary<br />

for making an educational textbook, I do believe that there is much that could be taught<br />

about computer networking by students experimenting with serial data communication. The<br />

audience that I am aiming for with these articles are the High School hackers/computer geeks<br />

and undergraduate CS majors. A High School teacher that wanted to tackle a subject like<br />

this, or if you wanted to cover a special topic course in a university setting where students<br />

could get some very hands-on experience with communications protocols. Every layer of<br />

5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!