Serial Programming

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

All bookshelves > Science bookshelf > Wikibooks:Information technology bookshelf > Serial Programming Book

Authors

This book consists of a series of articles (aka modules) regarding different aspects of serial data communication. Serial data communications is the foundation for most forms of data communications used with modern computing devices. The focus of the articles in this book will be around the implementation of RS-232 (aka RS-232C, aka V.24, aka EIA-232D, etc.) based serial data communication and will explore a wide range of implementations and uses for serial data transfer.

Contents

[edit] Book Contents

Wikibook Development Stages
Sparse text Image:00%.svg Developing text Image:25%.svg Maturing text Image:50%.svg Developed text Image:75%.svg Comprehensive text: Image:100%.svg


  • General
Introduction and OSI Network Model
RS-232 Wiring and Connections
Typical RS232-Hardware Configuration
  • Low-Level serial Interface Hardware
Programming the 8250 UART
MAX232 Driver/Receiver Family
  • Specific Programming Environments
Serial Data Communications in DOS
TAPI communications in Windows
Serial communications in Linux and Unix
Serial communications using Java
  • Programming serial Devices
Hayes-compatible Modems and AT Commands
  • Serial Programming Applications
Forming Data Packets
Error Correction Methods
Two Way Communication
Serial Data Networks
Practical Application Development
IP over Serial Connections

[edit] Further reading

Related Wikibooks and bookshelves:

[edit] Intended Audience

This series of articles is intended for people who are interested in diving into the "guts" of serial data communications systems. This material is rarely taught in university courses, and it can be tough to learn "on the job".

As with any software development, the individual topics are simple, but tying them all together can be very complex. This text takes a layered approach to the subject, in order to avoid overwhelming the novice. The first chapter deals with the bare copper wires and how they are handled. Subsequent chapters will add layers of protocol.

Typical serial communication can happen at just about any level. Some applications pull "raw" data right off the wires while others use full packet networks on multiple computers. For more, see "Why Serial Programming?" in the introduction.

[edit] Prerequisites

It is assumed that you are able to write software in at least one computer programming language. It will help if you can use a tool that supports low-level operating system access. This series is written toward the x86 platform of CPUs, but much of this information can be applied to other environments including custom embedded systems or other CPU systems. Details of I/O control will have to be garnered from the respective CPU architectures if you proceed in that manner with alternate CPU systems. If possible, please add to these articles if you are knowledgeable about this subject, particularly if you are familiar with some of these alternate software systems or CPU architectures.

If I haven't scared you off so far, I am still trying to write to a relative novice in computers. Writing low-level software/driver routines can be intimidating. Even if you are working from an API library, this sort of software development can be a very different experience from a typical "Hello World" application. While you may be able to write "Hello World" with a dozen lines or less in most software languages, transmitting "Hello World" across a serial connection can take quite a bit of code and reading up on all of the software settings and where they should be at. I'll give concrete examples and at the same time try to explain the "Why" as well as the "How".

In addition to compiler tools, having access to a good terminal emulator application would also be very useful. On multi-tasking systems like Windows or Linux, this can be run as a separate task from the application that you are developing. In cases like this it is helpful if your computer has at least two serial data communication ports, and that you have access to a "null-modem" cable, at least to start with. There are some software tricks to avoid this requirement, but it is much more satisfying if you can see actual communication occurring. Having access to a second computer drives the idea home even more, especially when data file transfer is covered. Serial Programming:RS-232 Connections describes a few more pieces of hardware (e.g. a Breakout Box or a Protocol Analyzer), both simple and advanced versions, which are useful when doing serial programming.

[edit] A Note on Terminology

The term 'RS-232' is used in a relaxed sense in this book, as it has become common in computing, and not in the strict sense of some RS-232 standard. The actual RS-232 standard is known under many different names, and in many different versions. Depending on the version, the standard does not even define all aspects which are commonly associated with 'RS-232' communication (e.g. start/stop bit framing).

Readers who need the precision of a standard are referred to one or more of the RS-232 standards. Readers who are interested in the practical programming of RS-232-like interfaces and devices should find useful information in this book.

[edit] Administration

[edit] Authors

If you have contributed to this Wikibook and would like to be listed as an author, please add your name to the page listed below:

Serial Programming:List of Authors

[edit] Distribution

For those who are interested can look at a compiled version of the Complete Wikibook for this subject.

A copy of this Wikibook has also been saved as a PDF File.Media:Serial Programming.pdf (version as of December 21st, 2005, pp. 177, 819 KB info )

[edit] Resources

[edit] Related Wikibooks

[edit] External Links to Resources

Personal tools