Links

8255 PPI IBM PC Interface Card
Arngren Electronics in Sweden
ELFA
Maplin
Allied Electronics, Inc.
www.bytronic.co.uk.
fpedersn@online.no

FPedersen's 8255 Homepage

Information and Links about the Intel 8255


Rev. December 1999


The 8255


Intel 8255 was introduced for interfacing the original 8 Bit microprocessors (8080 and Z80)
This homepage is for people interested in building or programming interfaces based on The 8255. My main interest is building Model Railroad interfaces based on the 8255. However most of the information here is not dependent of what you want to control
The easiest way to get a Parallel port on a PC, is to use the printer port. This is one 8 Bit port - The data Port (Pin 2-9), and one bit that are used for control (Pin 1). Ground is available on Pin 25.

PC Parallel Ports

It is posible to install up to four Parallel Ports in a PC. However only the first three are available for MS-Dos. It is posible to access these ports in three different ways:
Using high-level language Print Commands
This is usually the best aproach when communicating with a printer. The printer ports are called LPT1, LPT2 and LPT3
Using MS-DOS Service calls
You have to use interupt 21H, Function 40H, using handle value 4, to access LPT1
Direct Hardware Programming
This is the most complex alternative, but it gives a lot more control, and it makes it possible to have two way high speed interfacing. Direct Hardware Programming are used in my examples and programs

Direct Parallel Port Programming

The first requirement for using Parallel Port Program is to find the physical IO adress of the device:
The adresses for Interface 0, 1, and 2 (Interface 0 is LPT1) are placed in a memory buffer during system start-up. Interface 3 must be handled with an aditional driver


Physical adresses of Printer Ports buffers
Address (hex) Interface(BIOS) Device(MS-DOS)
0040:0008H 0 LPT1
0040:000AH 1 LPT2
0040:000CH 2 LPT3
0040:000EH 3 n/a

These addresses usually points to one or more block that are reserved for Parallell ports. MS-DOS have reserved the following physical IO adresses :
Physical I/O adresses for Printer Ports
I/O Address(Hex) Parallel Port
3BCH-3BFH Port on MDA
378H-37FH Second Parallel port (378H-37BH on IBM PS/2)
278H-27FH Third Parallel port (278H-27BH on IBM PS/2)


MDA (Monocrome Display Adapter) are normaly placed on Video Adapter Card( on older PC's ) or on the System Board. The MDA Port is not available on all PC's.

Alternative 8255 I/O Cards


The big Drawback with Printer Ports is that they only supports nine lines for each expansion card slott. However one Card with only one 8255 have 24 io lines, and it is possible to build or buy cards with many 8255's
(I have bought a card with 192 io lines for approx USD 100)
Alternative sources for 8255 Based IO cards:
How to build a 24 line IO card
My Card is produced by
xxxxx
xxxxx
xxxxx
xxxxx
Availability
UK - Maplin
Sweden - Arngren Electronics
Norway - Arngren Electronics
Maplin (and Arngren Electronics) also have a 24 line IO card kit.
The easiest way to get a Parallel port on a PC, is to use the printer port. This is one 8 Bit port - The data Port (Pin 2-9), and one bit that are used for control (Pin 1). Ground is available on Pin 25.

Parallell Port monitor

Before starting experimenting - you should build a LED indicator circuit.


You need
One DB25 Male plug
nine resistors 1k Ohm 1/4 Watt
one Yellow LED
eight Red LED


Building Instructions
Solder one end of each resistor to pin 1 - 9 of DB25 plug
Solder the other end of each resistor to the long leg (Anode) of each LED
Yellow LED should be connected to resistor connected to pin 1 of DB25
Solder all LED cathodes (short leg) together and connect to pin 25 of db25

Testing
You need a DC power source of between 5 and 12 Volt.
Connect the ground wire to pin 25, and connect the positive voltage to pin one - Yellow LED should light up
move positive voltage to pin two - First red LED should light up
Continue with pin three thru nine.

8255 Programming

Next step is to build a simple test program




fpedersn@online.no


This page hosted by get your own Free Home Page
1