Product Details
Parallel Port Complete: Programming, Interfacing, & Using the PC's Parallel Printer Port

Parallel Port Complete: Programming, Interfacing, & Using the PC's Parallel Printer Port
By Jan Axelson

List Price: $39.95
Price: $26.37 & eligible for FREE Super Saver Shipping on orders over $25. Details

Availability: Usually ships in 24 hours
Ships from and sold by Amazon.com

25 new or used available from $12.98

Average customer review:

Product Description

A guide to programming, interfacing, and using the personal computer's parallel printer port. Includes circuit designs and Visual-Basic code examples, plus tips on how to get the most out of the port, including the enhanced (EPP) and extended-capabilities (ECP) ports found on most new systems. Includes disk.


Product Details

  • Amazon Sales Rank: #440852 in Books
  • Published on: 1997-02-01
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 343 pages

Editorial Reviews

Review
An excellent resource for Visual Basic programmers looking to interface hardware through standard ports. Anyone designing hardware to work with a parallel port is well advised to add this book to their library. -- Personal Engineering and Instrumentation News, Paul Schreier, May 1997

If you need to do any development of parallel port devices or want to get a bit-level understanding of the port's inner workings, I strongly recommend Parallel Port Complete. -- Bill Machrone, PC Week, July 20, 1998

If you want to learn about PC-based parallel ports, then you need a copy of Jan Axelson's Parallel Port Complete. Good stuff. -- Electronics Now, Jeff Holtzman, Aug. 1997

It's been awhile since I've seen a book as practical as this one. Parallel Port Complete is a real keeper! -- Nuts & Volts, Joseph Carr, March 1997

The book is written in a very readable style and starts off with the basics; you don't have to be a hardware guru to read it. If you think you might ever need to access a parallel port (under any operating system), this book is for you. -- Windows Developer's Journal, Feb. 1998

About the Author

Jan Axelson has written dozens of articles for technical publications including Embedded Systems Programming, EDN, and Circuit Cellar. She is the author of USB Complete and Serial Port Complete. She lives in Madison, Wisconsin.

Excerpt. © Reprinted by permission. All rights reserved.
From Chapter 11, Modes for Data Transfer:

Detecting an ECP

In testing a port, you might think that the first step would be to test for an SPP, and work your way up from there. But if the port is an ECP, and it happens to be in its internal SPP mode, the port will fail the PS/2 (bidirectional) test. For this reason, the TestPort routine in Listing 4-4 begins by testing for an ECP.

An ECP has several additional registers. One of these, the extended control register (ECR) at base address + 402h, is useful in detecting an ECP.

Microsoft's ECP document recommends a test for detecting an ECP. First, read the port's ECR at and verify that bit 0 (FIFO empty) =1 and bit 1 (FIFO full) =0. These bits should be distinct from bits 0 and 1 in the port's Control register (at base address + 2). You can verify this by toggling one of the bits in the Control register, and verifying that the corresponding bit in the ECR doesn't change. A further test is to write 34h to the ECR and read it back. Bits 0 and 1 in the ECR are read-only, so if you read 35h, you almost certainly have an ECP.

If an ECP exists, you can read and set the port's internal ECP mode in bits 5, 6, and 7 of the ECR. In Listing 4-4, a combo box enables users to select an ECP mode when a port is ECP. Chapter 15 has more on reading, setting, and using the ECP's modes.

From Chapter 7, Output Applications:

Solid-state Relays

Another way to switch power to a load is to use a solid-state relay, which offers an easy-to-use, optoisolated switch in a single package. Figure 7-7A shows an example.

In a typical solid-state DC relay, applying a voltage across the control inputs causes current to flow in an LED enclosed in the package. The LED switches on a photodiode, which applies a control voltage to a MOSFET's gate, switching the MOSFET on. The result is a low resistance across the switch terminals, which effectively closes the switch and allows current to flow. Removing the control voltage turns off the LED and opens the switch.

Solid-state relays are rated for use with a variety of load voltages and currents. Because the switch is optoisolated, there need be no electrical connection at all between the control signal and the circuits being switched.

Solid-state relays have an on resistance of anywhere from a few ohms to several hundred ohms. Types rated for higher voltages tend to have higher on resistances. Solid-state relays also have small leakage currents, typically a microampere or so, that flow through the switch even when off. This leakage current isn't a problem in most applications.

There are solid-state relays for switching AC loads as well. These provide a simple and safe way to use a logic signal to switch line voltage to a load. Inside the relay, the switch itself is usually an SCR or TRIAC. Zero-voltage switches minimize noise by switching only when the AC voltage is near zero.


Customer Reviews

Very thorough treatment of parallel port control from VB.5
This is a very good book for those interested in controlling the parallel port interface on the PC. The most common usage is for cheap/inexpensive data acquisition or control, but the book also covers "LapLink" type transfers, high speed printing and device chaining. In my opinion, this books greatest strength is that all of the code is provided in Visual Basic, Delphi and C. Visual Basic and Win95/WinNT cannot directly control the printer port, so the authors have made a library of routines for use with any language, thus filling a hole that exists in Visual Basic. Anyone who wants to directly control the parallel port from Visual Basic will find everything they need (both on disk and in instruction) in this book.

e-book version is not worth buying2
Do not purchase the e-book version of this book.
The e-book version is over protected, Over priced and almost completely usless.
You Cannot print or copy and past the example code for use in your own programs. You do not get the Code disk with this either.
Neither can you copy the e-book to another computer or, as I was wanting, to a PDA. (The e-book is encripted)
Do Not waste your money on the e-book version of this book!
You will be better off with the Hard copy + Code disk.

Very useful indeed4
For many people involved in a project to connect something to a PC parallel port this book will be the only one needed. It contains detailed information about almost all aspects of parallel port interfacing for PC systems.

The author covers the port from the nitty gritty of designing and building custom hardware to connect to the parallel port to the higher level protocols such as the IEEE standard for daisy chain negotiation on the port.

The book covers all of the different modes of operation including ECP and EPP as well as the original parallel port and the PS/2 or bidirectional port.

As well as the descriptions of these aspects of the parallel port the book includes a disk with code to access and drive the port from Windows Visual Basic programs.

The book is aimed squarely at the PC & Windows world but it is applicable outside that environment. Many systems now include parallel ports that are register compatible with the PC parallel port from a programming point of view. More that that, the protocols that operate between the computer and the peripheral are standard and so something like the daisy chain protocol is relevant to any architecture that wants to use it.

My only criticism is the way in which some information is presented. It's not that anything is left out, but by way of an example, the IEEE standard document is a more readable description of the daisy chain protocol than this book.