{"id":452,"date":"2017-09-13T21:41:24","date_gmt":"2017-09-14T04:41:24","guid":{"rendered":"http:\/\/peterwong.net\/blog\/?p=452"},"modified":"2017-09-13T21:41:24","modified_gmt":"2017-09-14T04:41:24","slug":"connecting-a-parallel-printer-to-an-apple-ii-iigs","status":"publish","type":"post","link":"https:\/\/peterwong.net\/blog\/connecting-a-parallel-printer-to-an-apple-ii-iigs\/","title":{"rendered":"Connecting a Parallel Printer to an Apple II (IIgs)"},"content":{"rendered":"<p>I almost gave up on this project.&nbsp; 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.<\/p>\n<p>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.<\/p>\n<p>Except that&#8230; 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&#8230; uhm&#8230; eccentric way. From what I\u2019ve searched, the only devices that offered this pin arrangement is the APIC and the Apple Lisa parallel port.<\/p>\n<p>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 <a href=\"http:\/\/retired.beyondlogic.org\/spp\/parallel.htm\" target=\"_blank\" rel=\"noopener\">here<\/a>. 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:<\/p>\n<p><a href=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/APIC-DB-25-Pinout.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"184\" height=\"244\" title=\"APIC DB-25 Pinout\" style=\"display: inline; background-image: none;\" alt=\"APIC DB-25 Pinout\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/APIC-DB-25-Pinout_thumb.jpg\" border=\"0\"><\/a><\/p>\n<p>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 <a href=\"http:\/\/schmenk.is-a-geek.com\/wordpress\/?p=4\" target=\"_blank\" rel=\"noopener\">project<\/a>. 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.&nbsp; I just wanted to hook the APIC up to a parallel printer.<\/p>\n<p>Towards my goal, I dug up the only remaining parallel printer I have in storage. It&#8217;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.<\/p>\n<p>For those who want to connect the APIC to the parallel printer seamlessly, the standard DB-25 to Centronics cable is not suitable.&nbsp; Instead, look for a cable that matches Apple Product 590-0042 which compensates for the APIC pin arrangement.&nbsp; If you want to build your own cable, the mapping is documented in the Apple Peripheral Interface Guide:<\/p>\n<p><a href=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/AppleProduct-Cable-590-0042.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"244\" height=\"209\" title=\"AppleProduct-Cable-590-0042\" style=\"display: inline; background-image: none;\" alt=\"AppleProduct-Cable-590-0042\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/AppleProduct-Cable-590-0042_thumb.png\" border=\"0\"><\/a><\/p>\n<p>I took the challenge of building my own adapter, even though my soldering skills are way lower than that of David&#8217;s. When I paid a visit to Fry&#8217;s, I saw this useful RS-232 wiring adapter for adjusting the wiring connections of an RS-232 DB-25 cable:<\/p>\n<p><a href=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/RS-232-Wiring-Adapter.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"244\" height=\"184\" title=\"RS-232 Wiring Adapter\" style=\"display: inline; background-image: none;\" alt=\"RS-232 Wiring Adapter\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/RS-232-Wiring-Adapter_thumb.jpg\" border=\"0\"><\/a><\/p>\n<p>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.&nbsp; 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:<\/p>\n<p><a href=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/APIC-Wiring-1.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"244\" height=\"184\" title=\"APIC Wiring\" style=\"display: inline; background-image: none;\" alt=\"APIC Wiring\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/APIC-Wiring_thumb-1.jpg\" border=\"0\"><\/a>&nbsp; <a href=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/APIC-DIP-Switches-1.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"244\" height=\"184\" title=\"APIC DIP Switches\" style=\"display: inline; background-image: none;\" alt=\"APIC DIP Switches\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/APIC-DIP-Switches_thumb-1.jpg\" border=\"0\"><\/a>&nbsp;<\/p>\n<table style=\"width: 72.71%; height: 486px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\">APIC Pin #<\/td>\n<td valign=\"top\">Name<\/td>\n<td valign=\"top\">IEEE 1284 Pin #<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">2<\/td>\n<td valign=\"top\">Signal Ground<\/td>\n<td valign=\"top\">18<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">4<\/td>\n<td valign=\"top\">Signal Ground<\/td>\n<td valign=\"top\">19<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">5<\/td>\n<td valign=\"top\">Data Out, Bit 0<\/td>\n<td valign=\"top\">2<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">6<\/td>\n<td valign=\"top\">Data Out, Bit 1<\/td>\n<td valign=\"top\">3<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">8<\/td>\n<td valign=\"top\">Data Out, Bit 2<\/td>\n<td valign=\"top\">4<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">11<\/td>\n<td valign=\"top\">Data Out, Bit 5<\/td>\n<td valign=\"top\">7<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">12<\/td>\n<td valign=\"top\">Data Out, Bit 6<\/td>\n<td valign=\"top\">8<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">13<\/td>\n<td valign=\"top\">Data Out, Bit 7<\/td>\n<td valign=\"top\">9<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">15<\/td>\n<td valign=\"top\">Strobe Out<\/td>\n<td valign=\"top\">1<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">16<\/td>\n<td valign=\"top\">Acknowledge In<\/td>\n<td valign=\"top\">10<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">20<\/td>\n<td valign=\"top\">Signal Ground<\/td>\n<td valign=\"top\">20<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">22<\/td>\n<td valign=\"top\">Data Out, Bit 3<\/td>\n<td valign=\"top\">5<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">23<\/td>\n<td valign=\"top\">Data Out, Bit 4<\/td>\n<td valign=\"top\">6<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">24<\/td>\n<td valign=\"top\">Signal Ground<\/td>\n<td valign=\"top\">21<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>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 &#8212; double checking and tightening the wiring fixed that problem.<\/p>\n<p><a href=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/Apple-IIgs-Harmonie-1.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"244\" height=\"184\" title=\"Apple IIgs Harmonie\" style=\"display: inline; background-image: none;\" alt=\"Apple IIgs Harmonie\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/Apple-IIgs-Harmonie_thumb-1.jpg\" border=\"0\"><\/a>&nbsp; <a href=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/APIC-Printouts-1.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"244\" height=\"184\" title=\"APIC Printouts\" style=\"display: inline; background-image: none;\" alt=\"APIC Printouts\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2017\/09\/APIC-Printouts_thumb-1.jpg\" border=\"0\"><\/a><\/p>\n<p>The follow-up project that I have in mind is to write software drivers that make use of the Nibble data transfer mode.&nbsp; This would be similar to David Schmenk\u2019s code for reading image data from the QuickCam camera.&nbsp; It would make use of the BUSY, PAPER OUT, SELECT, and ERROR signal lines connected to four of the APIC Data In lines.&nbsp; The data rate limit for Nibble mode is around 100kbps.&nbsp; 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 <a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/master\/drivers\/scsi\/ppa.c\" target=\"_blank\" rel=\"noopener\">here<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I almost gave up on this project.&nbsp; 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 &hellip; <a href=\"https:\/\/peterwong.net\/blog\/connecting-a-parallel-printer-to-an-apple-ii-iigs\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[10,15,16],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-retrocomputing","tag-apple2","tag-hardware","tag-iigs"],"_links":{"self":[{"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":0,"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/posts\/452\/revisions"}],"wp:attachment":[{"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/media?parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/categories?post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/tags?post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}