Mastering Serial Communications

Peter W. Gofton

Publisher: Sybex, 1986, 289 pages

ISBN: 0-89588-180-2

Keywords: Networks

Last modified: March 13, 2022, 12:13 p.m.

Here at last is a complete, straightforward text on the software aspects of serial communications, including detailed information on the IBM PC's serial programming.

Mastering Serial Communications is an indispensible guide for programmers, and an excellent resource for students, data processing specialists, and PC users who seek advanced technical knowledge on microcomputer communications. Its comprehensive introduction to the subject covers everything from elementary concepts to interrupt-level communications programming. Topics include

  • hardware interfacing
  • character transmission
  • handshaking and buffers
  • controlling a smart modem
  • terminal emulation
  • non-ASCII data transfer
  • micro to mainframe communications
  • full specifications of the Kermit and XMODEM protocols

The author devotes four full chapters to the IBM PC and PC-DOS, detailing BIOS-level, user-level and systems-level communications, and the INS 8250 UART serial interface chip. The final lchapters present advanced communications programming techniques, illustrated by numerous programming examples in C, assembly language and BASIC — including a file downloading procedure and an interrupt service routine.

  • Part I: Overview of Serial Communications
    1. Hardware Interfacing
      • Introduction
      • Plugs and Sockets
      • The RS-232-C Standard
      • DTE and DCE
      • One-Way Communication
        • Hardware Handshaking
        • DTE to DCE
        • DCE to DTE
      • Two-Way Communications
      • Null Modem
      • Electric Signals
      • RS-449
        • The Apple Macintosh
      • Trouble Shooting
        • Is a Null Modem Needed?
        • Handshaking Problems
        • Using Break-Out Boxes
        • Other Problems
      • Summary
    2. Character Transmission
      • Introduction
      • Data Format Within the Computer
        • Bits and Byes
        • Coding Text
        • Special ASCII Characters
        • Coding Nontextual Material
      • Conversion to Serial Form
      • Synchronous and Asynchronous Communications
      • Framing
        • Start Bits
        • Data Bits
        • Parity Bits
        • Stop Bits
        • Break
      • Baud Rate
      • Trouble Shooting
        • Baud Rate Mismatch
        • Word-Length Mismatch
        • Parity Error
        • Stop bits
        • Framing Eror
    3. Handshaking and Buffers
      • Introduction
      • Hardware Handshaking
      • Software Handshaking
        • XON(XOFF
        • ETX/ACK
      • Combined Hardware and Software Handshaking
      • Buffers
        • Input Buffers
        • Output Buffers
        • In-Line Buffers
    4. Modems
      • What Modems Do
      • How Modems Work
        • 300 bps Modems
        • 1200 bps Modems
        • 2400 bps Modems
        • Higher Speed Modems
      • Connecting the Modem to Your Computer
      • Controlling the Modem
        • Command Mode and On-Line Mode
        • Result Codes
        • Command Lines
      • Programming the Modem
    5. Telecommunications Methods
      • Introduction
      • Direct-Dialed Circuits
      • Leased Lines
        • Voice Grade
        • Digital Circuits
      • Packet Switching Networks
      • The X.PC Protocol
        • Logical Channels
      • ISDN
    6. Micro/Mainframe Communications
      • The Great Divide
      • Terminal Emulation
        • Dumb Terminals
        • Intelligent Terminals
        • Microcomputers as Terminals
        • Terminal Emulation Problems
        • Beyond Terminal Emulation
      • Physical Connections
      • Synchronous Protocols
        • BISYNC
        • SDLC
        • HDLC
        • ADCCP
        • X.25
    7. File Transfer
      • Introduction
      • Why Protocols are Needed
        • Word Length
        • Control Characters
        • Block Length
        • Handshaking
        • Error Checking
      • File Transfer Protocols
        • Hex Conversions
        • XMODEM
        • Kermit
        • CompuServe B
        • X.PC
      • Other File Transfer Considerations
        • Packets and Layers
        • Data Format
        • Half and Full Duplex
        • Disk Format Conversion
    8. XMODEM
      • Introduction
      • Blocks
      • File Level Protocol
      • The CRC Option
      • YMODEM Enhancements
      • XMODEM Advantages and Disadvantages
      • Summary
    9. Kermit
      • Introduction
      • Using Kermit
        • System Requirements
      • Character Encoding
        • Control Characters
        • Eight Bit to Seven Bit Conversions
        • Kermit Information Characters
        • Compression
      • Packets
        • General Packet Format
        • Initializing the Transactions
        • Initializing Packets
        • Data Transfer
        • Interrupting Transfers
        • Interrupt Data
      • Error Checking
        • One-Character Checksum
        • Two-Character Checksum
        • Three-Character CRC
      • Optional Kermit Features
        • Long Packet Extension
        • Sliding Windows
      • Implementing Kermit
      • Further Information
    10. Programming Topics
      • Introduction
      • UARTS
        • The Job of the UART
        • Connections to the UART
        • Main UART Registers
        • Polling versus Interrupts
      • Circular Buffers
        • Creating the Buffer
        • Adding Characters
        • Retrieving Characters
      • Cyclical Redundancy Checks
  • Part II: The IBM PC and PC DOS
    1. IBM PC Communications at the User Level
      • Introduction
      • Hardware
        • The Make-up of the Computer
        • Serial Cards
      • Overview of DOS
        • Booting DOS
        • What DOS Does
        • DOS Device Names
        • Device Drivers
      • The MODE Command
        • Assigning Devices
        • Setting Communications Options
      • Standard Input/Output
      • The COPY Command
      • The CTTY Command
      • Communications Software
    2. IBM PC Communications at the DOS and BIOS Level
      • Introduction
      • DOS and BIOS
        • Software Interrupts
        • The DOS Functions
        • The BIOS Functions
      • Handshaking under BIOS
      • DOS and BIOS versus Direct Control of the Hardware
        • The Advantages of DOS and BIOS
        • The Disadvantages of DOS and BIOS
      • Conclusion
    3. The INS 8250 UART
      • Introduction
      • Registers of the UART
        • Control Registers
        • Status Registers
        • Buffer registers
      • Programming the 8250: Polling Methods
      • Programming the 8250: Interrupt Method
    4. The IBM PC at the Systems Level
      • Introduction
      • IBM PC Architecture
        • The 8088 Processor
        • Bus Architecture
        • Accessing Main Memory
        • I/O Addresses
        • Interrupts
      • Serial Interface Boards
        • Serial Adapter Interrupts
        • Serial Adapter I/O Addresses
      • Programming Considerations
        • Polling
        • Interrupt Service Routines
        • A Note on the IBM PC-AT
  • Part III: Serial Communications Programming
    1. Communicating in BASIC
      • Introduction
      • Buffering
      • I/O Streams
        • The OPEN "COM . . ." Command
        • Reading from an I/O Stream
        • Writing to an I/O SXtream
        • Closing an I/O Stream
      • Programming the UART through BASIC
        • Reading a Byte from a Port
        • Writing a Byte to a Port
        • Bit Manipulation
        • Examples of BASIC UART Control
      • Error Conditions
        • Error 69: Communication Buffer Overflow
        • Error 25: Device Fault
        • Error 57: Device I/O Error
        • Error 24: Device Timeout
        • Error 68: Device Unavailable
      • Sample Program
    2. Communicating in C
      • Introduction
      • Bit Manipulation in C
        • Testing a Bit
        • Setting a Bit to One
        • Setting a Bit to Zero
        • Coding Conventions for Bitwise Operators
      • Operating-System Calls
        • The bdos Function
        • MSC Gate Structures
        • The int86 Function
        • Setting the Parameter Byte
      • Programming the UART Directly
      • Sample Programs
        • The DOWNL1 Program
        • The DOWNL2 Program
        • The DOWNL3 Program
      • Interrupt Driven I/O
      • Circular Buffers
      • CRC Computations
    3. Communicating in Assembly Language
      • Introduction
      • Bit Manipulation in Assembly Language
        • Testing a Bit
        • Setting a Bit to One
        • Setting a Bit to Zero
      • Using DOS Interrupts from Assembly Language
      • Using ROM-BIOS Interrupts from Assembly Language
      • Controlling the UART in Assembly Language
    4. An Interrupt Service Routine
      • Introduction
      • Overview
      • Initialization
      • Part One of the ISR: inthand
      • Part Two of the ISR: cfunct()
        • Compiling cfunct()
        • Modifying cfunct()
      • Putting It Together
  • Appendix A: Common Pin Connections
  • Appendix B: Glossary
  • Appendix C: Bibliography

Reviews

Mastering Serial Communications

Reviewed by Roland Buresund

Mediocre **** (4 out of 10)

Last modified: May 21, 2007, 3:12 a.m.

I have used this book to communicate with a PCR-robot. With that said, it is pretty shallow in parts and assumes that you have certain chips and PC-DOS. Today, you could probably find something more intelligent on the web.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required