Classic Computer Magazine Archive ST-Log ISSUE 19 / MAY 1988 / PAGE 44


The Master Switch

Getting the most out of your printer.

by Matthew J.W. Ratcliff

Matthew Ratcliff is an electrical engineer in St. Louis, Missouri. When not using his spare time to write articles, he's president of ACE St. Louis and a remote SYSOP on Gateway City BBS, (314) 647-3290.

There are probably many readers out there who own both 8-bit and 16-bit Atari computer systems. And—if you're like me—your printer tends to serve double-duty between both machines. Once while juggling my Gemini 10X between the two computers (with power on), I zapped the printer and the ST! That nightmare was detailed in issue 12. Suffice it to say, I learned from my mistakes—and built The Master Switch to prevent a reoccurrence.

For two computers to share the same printer, we must switch the eight data lines and the STROBE line going to the printer. Normally, this would require a pretty hefty mechanical switch, which is what most expensive printer switch boxes use. These boxes are universal in that they'll work with just about anything using Centronics connectors. With one of these switch boxes you can hook many computers to the same printer, or many printers to one computer. The switch we need is a bit simpler, and can probably be built for less than $30.

Looking at the schematic (next page ), you can see that the heart of The Master Switch is a pair of 74LS244s. These are 8-bit latches with tri-state outputs. The DPDT switch allows only one chip, and thus, computer, to talk to the printer at a time. When a chip is off, its output lines go to a "high Z" state, where they don't affect the outgoing data lines.

The DPDT switch toggles an enable line on the chips. It also switches the STROBE line coming from the appropriate computer. There weren't enough lines in the 74LS244 chips to handle this one.

Notice that the busy signal coming back is "wire ORed" to both computers. Two computers may look at the same input line, without affecting it. The outputs must be separated with the switch and chips, however. Otherwise, they would hopelessly confuse the printer—and possibly the computers. (Note that we can "wire OR" the outputs of the 74LS244 chips together because of their tri-state outputs, which esentially disconnects them from the control of the printer when disabled.)

I've also included an LED with a 1K current limiting resistor on each side of the DPDT switch. This just serves as a reminder that the printer's power is on. The switch position indicates which computer has control of the printer, but the chips in the switch require power. It gets that power from pin 18 on the Gemini printer connector. If you want to build this box for a different printer, check your manual to see what pin +5 volts is available on. On some Epson printers it's either pin 18, or pin 35.

If your printer doesn't bring +5 volts out to its Centronics connector, you have several options. You can find +5 volts on a chip inside the printer and run it to an unused pin on the connector. You could also take +5 volts off pin 9 on your 850 parallel interface. (This, however, would require that you have the 850 interface on whenever you want to use the printer, even if using the ST.

Your final option may be to get a small power pack—as long as it puts out +5 volts DC at a minimal current rating. (Nine-volt DC packs are common for calculators. You can regulate that down to 5 volts with the proper zener diode and current limiting resistor.) These LS (Low power Schottky) chips require very little power and shouldn't draw much current from the source you use.

This switch will work with two STs sharing the same printer as well. Two 8-bit Ataris will also work with The Master Switch, as shown here.

To start, you will need the following items:

A small (3x6x2&inch;) plastic project box.

Two Centronics female connectors and mounting hardware.

One male Centronics connector, and 3 feet of 12-wire cable.

Two 74LS244 chips.

An electronic project board.

Two 1K, ¼-watt resistors.

Two LEDs and two more 1K, ¼-watt resistors (optional).

One DPDT switch.

A low wattage soldering iron (25 watts) and solder.

Two 20-pin sockets (wire wrap type if you're planning to wire wrap the project).

Some standoffs and screws for mounting the board.

Wire wrap wire and tools, if preferred.

Small hookup wire, if soldering method is desired.

If you have any electronic kit-building experience this project shouldn't be too tough. I spent more time mounting all the stuff in the plastic case than actually wiring it up.

Mount your Centronics female connectors in the case and label them for reference. I called one "XC" for the 130XE connection and the other "SC" for the ST hookup. The output connector to the printer is referred to as "PC." Connect pins 2-9 of the XC Centronics connector to the appropriate pins on one of the 74LS244 chips (called the XB chip, for XE Buffer). Wire the STROBE line from XC pin 1 to one side of the DPDT switch. On the same end of the switch, at the opposite terminal, connect pins 1 and 19 of the XB chip (the SELECT signal). Pins 1 and 19 of the XB should also be tied to +5 volts through a 1K pullup resistor. You will also attach your LED and current limit resistor to this same point.

The bottom of The Master Switch circuit board, showing detail of the wire wrap job.

Follow the same procedure for the other chip, SB, and the ST Centronics connector. Remember to wire the ST STROBE line exactly opposite the XE STROBE on the DPDT switch, and similarly for the SELECT line. The two center terminals of the DPDT will be the switched control lines. Connect the center terminal on the SELECT side to ground. The other goes to the STROBE line to the male Centronics connector for the printer, PC pin 1. Your switch should be wired like the following example:

When the switch enables the XE to drive the printer, SELXE will be tied to ground and STROBE XE will be connected to STROBE out to the printer. Pins 1 and 19 will be switched to ground, enabling the XB chip to drive the printer from the XE data lines. It will also provide a ground reference for the LED—if wired in—and it will light. At the same time, pins 1 and 19 of the SB chip will be pulled high to 5 volts, thus disabling that chip's output lines, regardless of what the ST might try to send it.

The output lines of the two 74LS244 chips should be wired together as shown, and to the printer Centronics male connector. I wired them to a 3-foot cable to connect the printer.

The rear of The Master Switch case, showing the two flush mounted female connectors and the cable for the printer. The labels were made with Print Master.

Whether you wire wrap or solder this project, be sure to double check all connections before hooking it up. Make sure there are no solder bridges between pins on the chips or connectors. Look over the photos here to get a better idea of how I put mine together.

The top side of The Master Switch board, showing the 74LS244 chips. The two vertical rows of wires to the left are the wires going to the 8-bit and ST Centronics printer connectors. The wires soldered to the bottom of the board are going to the male Centronics connector for the printer.

If you want to save a few bucks, you can replace the XC connector with a 15-pin male connector on a cable, hooking it directly to the 850 interface. If you plan to switch a printer between two 8-bit systems, you could do the same with the SC. You'll have to figure out which pins to use to make your connections. Just remember, if you do it this way, The Master Switch will only work with 8-bits. By using Centronics connectors, it will work with almost any two computers sharing the same printer.

The Master Switch will save lots of wear and tear on your cables, connectors and printer. At the flick of a switch, either machine can use the printer—without the risk of damaging your valuable equipment.