Coprolite.com
Google
 
Web Coprolite.com
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Microcontrollers | Graphics | Z-80 | FreeDOS | Electronics | Odyssey 2 | 8048 | Other/Msc.

Last 30 Days | Last 60 Days | Last 90 Days | All Articles/Links


Categories:
·GNU/Linux
·Homebrew Designs
·Perl
·Microcontrollers
·Graphics
·Z-80
·FreeDOS
·Other/Msc.
·Electronics
·8048
·All Categories
·Other SignalQ Websites




Z-80 Homebrew Computer - Parallel Port Opto-isolator
Topic: Z-80   Posted:2003-07-05
Printer Friendly: Print

spacer
There are 12 parts to this article:
1 - 2 - 3 - 4 - 5 - 6 < 7 - 8 - 9 - 10 - 11 - 12

My Z-80 homebrew computer communicates via the PCs parallel printer port. I designed a circuit that uses opto-isolators to protect the PC from rogue voltages. Also, if the wiring in your house is funky, opto-isolators can help quite a bit with line noise. Even if you have no interest in building a Z-80 homebrew computer, this circuit could be used if you want to, say, hook your lab experiments up to the parallel port on your PC. Warning: you could very well electrocute yourself or destroy your PC. Don't tinker with this unless you are absolutely sure about what you are doing. See this website's terms of use.

I use a book called 80x86 IBM PC and Compatible Computers: Assembly Language, Design, and Interfacing Volume I and II by Muhammad Ali Mazidi and Janice Gillispie Mazidi for the nitty gritty stuff on the printer ports, which is where I found the above very cool debug test. It has many details on the design and Interfacing of PCs. Another good book is Parallel Port Complete by Jan Axelson. There is a lot of included Visual Basic code, which you may find useful. Personally, I wish the code was more low level. It seems absurd to load windows and VB just to tweak a printer port. Then again, I tap out my bootstrap bit-by-bit with paperclips. :) If you are primarily interested in Parallel Port interfacing, Axelson's book is probably best. If you are at all interested in the other components of the PC, and the assembly language and BIOS stuff behind the components, then get Mazidi's book.

Let's build an optoisolator interface for the parallel port! I have these most fabulous NEC PS9601 optoisolators with gates for the output. Since we aren't going bidirectional on the printer port, our design challenge is pretty easy.

The first problem in interfacing this, is that we should really buffer the parallel port outputs before we do anything else with the lines. We are only gauranteed the specs of a 74ls374 on the output, so driving the LED on the optoisolator is a little sketchy. Also, we want to fully isolate in the other direction too, so we need to power the optoisolators coming in. Here is how I got the 5v power out by hooking up a wire to my graphics/parallel card:



Most circuit boards will have decoupling capacitors between +5 and ground. They are used to reduce glitches in the power supply when the circuits switch, particularly with TTL. I just found the decoupling capacitor for the 74ls244 and soldered onto that. I drilled a hole through the mounting plate of my parallel port board, put heat shrink tubing around the wire for flex and wear protection, and put an insulated connector on the end of the wire. If you prefer, you could just use a power-y to get the power out of the pc. Yet another option is to use a separate power supply with a common ground via pin 25 on the parallel port. I think this kind of defeats the purpose, since the main thing is to avoid touching the ground of the pc with any other source.

OK the first step after coming up with the rough design is to breadboard the circuit. I have a lot of .1 and .01 microfarad caps spread around for decoupling. I also have some electrolytics to temper the power I'm getting from long supply lines. Now to write up the schematic in XFIG and build the puppy.

Here is a png of the schematic (click for a larger image):



You may need to right-click, save to your local hard disk, and open the graphic with your favorite graphics program. There is a lot of room in the circuit for additional control, since there are a lot of chip select signals that are wired selected. This could easily be modified for bi-directional data. You might also be able to design in some safegaurds, like requiring the homebrew and the PC to enable the buffers before transfer takes place. This isn't as critical for only one direction, but might be useful if you wanted to share the same i/o port on the device (Homebrew computer). You would then want to disable the output from the isolator circuit until you are reading from the PC. This would keep you from blowing up your PIO if you wrote to the same port that was hooked up to the PC/Isolator circuit.

I've really overdesigned this. The outputs of the 9601 can sink an absolute maximim of 50 miliamps, and the printer port is fully buffered with '244s. Some parallel ports could probably drive the 9601 directly. I probably could also have used optoisolators that had multiple detector/LEDs on in one package. It seemed though, that the 9601 was optimized for digital data, so I figured this would be the safest route.

Here is the XFIG file for the schematic. If you can view this in XFIG, it is much nicer. If you need to get XFIG, try XFig.org. Also, check out the graphics section.

Here is the interface, soldered up and ready to stick in a box:

Here is the constructed interface:




Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. Coprolite.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 Coprolite.com

Created by:
MCJ
MCJ CMS