Connecting a Parallel Printer to an Apple II (IIgs)

I almost gave up on this project.  It was a project meant to have been a jump-off point for a more ambitious one, but at the rate I end up working on these types of projects, I should probably scale back on my project list.

The Apple II Parallel Interface card (APIC), Apple Product 670-0021, caught my attention a few years ago. It is one of the interface cards that would allow you to connect standard parallel printers to your Apple II/IIgs. It stands out among other parallel interface cards because the cable attached to the card ends in a female DB-25 port instead of a standard 36-pin male Centronics port that connects directly to the printer. That DB-25 port opens up a lot of opportunities for connecting all kinds of peripherals.

Except that… in typical Apple style, the pinout for that DB-25 port, or the 26-pin ribbon connector in the APIC, is arranged in a very… uhm… eccentric way. From what I’ve searched, the only devices that offered this pin arrangement is the APIC and the Apple Lisa parallel port.

If you search for the typical DB-25 connector parallel port pinout offered in the IBM PC and compatibles, there is an almost one-to-one mapping to the 36-pin Centronics port of parallel printers. That DB-25 connector is the IEEE 1284 Type A standard as described here. At the very least, the data pins are in a contiguous arrangement. Pins 2-9 on both the DB-25 and the Centronics connector are the data pins. With the APIC, the following photo shows the arrangement as documented in the manual:

APIC DB-25 Pinout

That insane arrangement was enough for me to temporarily shelve my project for years. Then in 2013, David Schmenk used the APIC for a similar project. He probably wondered about that same peculiar DB-25 pin arrangement on the APIC, and went further to document the necessary mapping monstrosity to hook it up to a QuickCam camera.  I just wanted to hook the APIC up to a parallel printer.

Towards my goal, I dug up the only remaining parallel printer I have in storage. It’s an HP DeskJet 340, a portable printer that originally sold in the `90s for $300. I also had the standard DB-25 to Centronics cable that I used to connect the printer to old PCs.

For those who want to connect the APIC to the parallel printer seamlessly, the standard DB-25 to Centronics cable is not suitable.  Instead, look for a cable that matches Apple Product 590-0042 which compensates for the APIC pin arrangement.  If you want to build your own cable, the mapping is documented in the Apple Peripheral Interface Guide:

AppleProduct-Cable-590-0042

I took the challenge of building my own adapter, even though my soldering skills are way lower than that of David’s. When I paid a visit to Fry’s, I saw this useful RS-232 wiring adapter for adjusting the wiring connections of an RS-232 DB-25 cable:

RS-232 Wiring Adapter

I started to re-map the pins, only to find out that the adapter does not allow re-mapping of Pin 1. In RS-232 connections, pin 1 is always connected to GND.  I really needed Pin 1 because that pin is used for the STROBE signal to the printer. I could have played around with some gender changers, but that would tie Pin 13 to GND which I might need for bidirectional data transfer (Pin 13 is the SELECT line for the parallel connection which is needed for Nibble mode data transfer). I gave up on the adapter, and proceeded with the following embarrassment:

APIC Wiring  APIC DIP Switches 

APIC Pin # Name IEEE 1284 Pin #
2 Signal Ground 18
4 Signal Ground 19
5 Data Out, Bit 0 2
6 Data Out, Bit 1 3
8 Data Out, Bit 2 4
11 Data Out, Bit 5 7
12 Data Out, Bit 6 8
13 Data Out, Bit 7 9
15 Strobe Out 1
16 Acknowledge In 10
20 Signal Ground 20
22 Data Out, Bit 3 5
23 Data Out, Bit 4 6
24 Signal Ground 21

To test the cable, I installed the Harmonie DeskJet printer drivers, installed the GS/OS Teach application, and typed a short sentence. The printouts turned out well. There was an initial run (first sheet) that indicated one of the pins probably being disconnected and always getting a bit value of 1 on the lowest data pin — double checking and tightening the wiring fixed that problem.

Apple IIgs Harmonie  APIC Printouts

The follow-up project that I have in mind is to write software drivers that make use of the Nibble data transfer mode.  This would be similar to David Schmenk’s code for reading image data from the QuickCam camera.  It would make use of the BUSY, PAPER OUT, SELECT, and ERROR signal lines connected to four of the APIC Data In lines.  The data rate limit for Nibble mode is around 100kbps.  Ultimately, it may be enough to use the APIC as a cheap interface card for mass storage devices like the Iomega Zip Drive, whose block transfer protocol is widely documented in the Linux drivers repository (see the PPA3 driver here).

This entry was posted in Retrocomputing and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.