INTRODUCTION

The PCI bus 8255 adapter is a 32 bits PCI bus adapter with Plug and Play (PnP) features, it is a programmable I/O interface for PC/486, Pentium or compatible computers. The PnP features let hardware configuration for IRQ and I/O address is detected by BIOS automatically, you don¡¦t need set switch and jumper.

The PCI bus 8255 adapter provides total 6 digital I/O ports, each I/O port contains 8 I/O lines, and can be set either input or output by the user¡¦s program. The signal assignments of PCI bus 8255 adapter is designed as a standard configurations, so that it can be used to connect to the 8255 terminator board for several applications.

The features of the PCI bus 8255 adapter are:

*32 bits PCI bus with Plug and Play (PnP) features.

*Programmable I/O control functions.

*Up to 48 I/O lines.

*Maximum of 10 MHZ counter rate.

*Support several operating modes that are programmable.

*Provides DII device driver for PnP features.

UNPACKING INFORMATION

Check that your PCI bus 8255 package includes the following items:

*PCI bus 8255 adapter.

*Demo Program.

*Data Capture Software Manual with CD.

*8255 terminator board (option).

*Two expansion flat cables (option).

*DII device driver.

*User manual.

*Warranty form.

HARDWARE INSTALLATION

Your PCI bus 8255 adapter is designed to be inserted in any available PCI slot in your PC/486, Pentium or compatibles. In order to gain access to the expansion slots, follow the steps listed below:

1.Turn off all power to your computer and all peripheral devices before installing your 8255 adapter.

2.Remove the cover of the computer.

3.Insert the 8255 adapter into any available PCI slot. Make sure the adapter is firmly seated in the chosen slot.

4.Replace the cover of the computer.

5.Connects the expansion cables.

6.Turn on the power of your computer, the PnP features will recognize the 8255 adapter.

HARDWARE CONFIGURATION

4.1 I/O Port Address

Base + 0 : Port 1A input/output buffer.

Base + 1 : Port 1B input/output buffer.

Base + 2 : Port 1C input/output buffer.

Base + 3 : Port 1 control register.

Base + 4 : Port 2A input/output buffer.

Base + 5 : Port 2B input/output buffer.

Base + 6 : Port 2C input/output buffer.

Base + 7 : Port 2 control register.

Base + 8 : Counter 0 input/output buffer.

Base + 9 : Counter 1 input/output buffer.

Base + A : Counter 2 input/output buffer.

Base + B : Counter control register.

4.2 DIP Switch

The switch is used to identify card number, default setting is card 15. There are two methods to set the card number:

a. PnP mode
Just plug in PCI bus adapter into PCI slot, the PCI BIOS will allocate I/O address to each adapter automatically and assign card number start from 0 to each adapter. You may set any card number at PnP mode, and you need use software tools to distinguish port id. Almost all of the operating systems run at PnP mode.

b.Manual mode
Set card number by card identifier switch, the PCI BIOS will assign pre-allocated I/O address to each adapter. Please set different card number to each adapter (do not duplicate card number setting).


•  The card number starts from 0 to 15.

 

 

4.3 Pin Assignments

1. Pin Assignments for CN1 Connector

Pin Function Pin Function
1
GND
2
GND
3
GND
4
P1A3
5
P1A1
6
P1A2
7
CLK0
8
P1A0
9
GATE0
10
OUT0
11
OUT2
12
CLK2
13
CLK1
14
GATE2
15
OUT1
16
GATE1
17
P1A5
18
P1A4
19
P1A7
20
P1A6
21
P1C6
22
P1C7
23
P1C4
24
P1C5
25
P1C1
26
P1C0
27
P1B7
28
P1C2
29
P1B6
30
P1C3
31
P1B5
32
P1B0
33
P1B4
34
P1B1
35
P1B3
36
P1B2
37
+5V
38
-5V
39
+12V
40
-12V

.2. Pin Assignments for CN2 Connector

Pin Function Pin Function
1
GND
2
GND
3
GND
4
GND
5
GND
6
GND
7
GND
8
GND
9
GND
10
GND
11
GND
12
GND
13
P2A0
14
P2A1
15
P2A2
16
P2A3
17
P2A4
18
P2A5
19
P2A6
20
P2A7
21
P2C7
22
P2C6
23
P2C5
24
P2C4
25
P2C0
26
P2C1
27
P2C2
28
P2B7
29
P2C3
30
P2B6
31
P2B0
32
P2B5
33
P2B1
34
P2B4
35
P2B2
36
P2B3
37
+5V
38
-5V
39
+12V
40
-12V

3. Pin Assignments for IDC40 Female TO DSUB-50 Female Cable

      IDC40 Female TO DSUB-50 Female Cable Pin Assignment

DII DEVICE DRIVER

To install DII (Decision Industrial Interface) for Windows 95 and Windows NT, you may start the installation by running SETUP.EXE supplied on this distribution CD. During installation, the Setup application will install an icon into a new program group in your start menu (default name: "Decision Industrial Interface"). After DII is installed, please select ¡§Start¡¨ menu, then ¡§Settings¡¨, then ¡§Control Panel¡¨, then ¡§Add New Hardware¡¨ menu, then select PCI 8255 card on the ¡§Industrial I/O Devices¡¨ hardware group.

The DII provides DLL, OCX, ... etc. components for further programming. For more details, please refer DII manual.


DIAGNOSTIC

6.1 BASIC Programming

100 REM 8255 I/O CARD TESTING PROGRAM

110 SCREEN 0,0,0: WIDTH 80,25: KEY OFF: CLS

120 LOCATE 10,10: PRINT "8255 I/O CARD TESTING"

130 LOCATE 12,10: PRINT "TWO 8255 PORT A,B,C OUTPUT SQUARE WAVE"

140 LOCATE 14,10: PRINT "8253 COUNTER 0 DIVIDE BY 2"

150 LOCATE 16,10: PRINT " COUNTER 1 DIVIDE BY 50"

160 LOCATE 18,10: PRINT " COUNTER 2 DIVIDE BY 100"

250 REM 8253 TESTING

255 PORT = &H1B0

260 OUT PORT+11,&H36

270 OUT PORT+11,&H76

280 OUT PORT+11,&HB6

290 OUT PORT+8,&H2: OUT PORT+8,&H0

300 OUT PORT+9,&H32: OUT PORT+9,&H0

310 OUT PORT+10,&H64: OUT PORT+10,&H0

320 PORT=&H1B0

330 OUT PORT+3,&H80

340 A=0: GOSUB 500

345 FOR K= 0 TO 1000: NEXT K

350 A=&HFF: GOSUB 500

360 PORT=PORT+4

370 OUT PORT+3,&H80

380 A=0: GOSUB 500

385 FOR K=0 TO 1000: NEXT K

390 A=&HFF: GOSUB 500

400 GOTO 320

500 FOR I=0 TO 2

510 OUT PORT+I,A

520 NEXT I

530 RETURN

6.2 PASCAL Programming

program diagnostic(input, output);

uses Crt;

var a, i, test : integer;

procedure subtest;

begin

for i := 0 to 2 do

port[test+i] := a;

end;

begin

{ 8255 I/O Card Testing Program }

clrscr;

gotoxy(10, 10);

writeln('8255 I/O CARD TESTING');

gotoxy(10, 12);

writeln('TWO 8255 PORT A,B,C OUTPUT SQUARE WAVE');

gotoxy(10, 14);

writeln('8253 COUNTER 0 DIVIDE BY 2');

gotoxy(10, 16);

writeln(' COUNTER 1 DIVIDE BY 50');

gotoxy(10, 18);

writeln(' COUNTER 2 DIVIDE BY 100');

{ 8253 Testing }

test := $1B0;

port[test+11] := $36;

port[test+11] := $76;

port[test+11] := $B6;

port[test+ 8] := $02; port[test+ 8] := $0;

port[test+ 9] := $32; port[test+ 9] := $0;

port[test+10] := $64; port[test+10] := $0;

repeat

test := $1B0;

port[test+3] := $80;

a := 0; subtest;

for i := 0 to 1000 do;

a := $ff; subtest;

test := test + 4;

port[test+3] := $80;

a := 0; subtest;

for i := 0 to 1000 do;

a := $ff; subtest

until keypressed;

end.

6.3 C Programming

#include <stdio.h>

#include <conio.h>

int test,i,a;

void subtest()

{

for(i=0;i<=2;i++) outportb(test+i,a);

}

main()

{

clrscr();

gotoxy(10,10);

puts("8255 I/O CARD TESTING");

gotoxy(10,12);

puts("TWO 8255 PORT A,B,C OUTPUT SQUARE WAVE");

gotoxy(10,14);

puts("8253 COUNTER 0 DIVIDE BY 2");

gotoxy(10,16);

puts("8253 COUNTER 1 DIVIDE BY 50");

gotoxy(10,18);

puts("8253 COUNTER 2 DIVIDE BY 100");

test = 0x1b0;

outportb(test+11,0x36);

outportb(test+11,0x76);

outportb(test+11,0xb6);

outportb(test+ 8,0x02);

outportb(test+ 8,0x00);

outportb(test+ 9,0x32);

outportb(test+ 9,0x00);

outportb(test+10,0x64);

outportb(test+10,0x00);

do {

test = 0x1b0;

outportb(test+3,0x80);

a = 0;

subtest();

for(i=0;i<=1000;i++);

a = 0xff;

subtest();

} while(!kbhit());

}

APPENDIX A

TERMINATOR BOARD

The 8255 terminator board provides expansion signal connection for convenience purpose. When power control on the normal condition, the LED will light. To connect 8255 adapter to terminator board, please plug in CN1 connector (at 8255 adapter) to J1 (at terminator board). The similar method will be used to connect CN2 to J2. The signal assignment is shown in the follows.

1. TB1

PORT 1 PA0
PORT 1 PA1
PORT 1 PA2
PORT 1 PA3
PORT 1 PA4
PORT 1 PA5
PORT 1 PA6
PORT 1 PA7
PORT 1 PB0
PORT 1 PB1
PORT 1 PB2
PORT 1 PB3
PORT 1 PB4
PORT 1 PB5
PORT 1 PB6
PORT 1 PB7

2 TB2

PORT 1 PC0
PORT 1 PC1
PORT 1 PC2
PORT 1 PC3
PORT 1 PC4
PORT 1 PC5
PORT 1 PC6
PORT 1 PC7
PORT 1 PA0
PORT 1 PA1
PORT 1 PA2
PORT 1 PA3
PORT 1 PA4
PORT 1 PA5
PORT 1 PA6
PORT 1 PA7


3 TB3

PORT 2 PB0
PORT 2 PB1
PORT 2 PB2
PORT 2 PB3
PORT 2 PB4
PORT 2 PB5
PORT 2 PB6
PORT 2 PB7
PORT 2 PC0
PORT 2 PC1
PORT 2 PC2
PORT 2 PC3
PORT 2 PC4
PORT 2 PC5
PORT 2 PC6
PORT 2 PC7

4 TB4

CLK0
GATE0
OUT0
CLK1
GATE1
OUT1
CLK2
GATE2
OUT2
GND1
GND2
+5V
-5V
GND1
GND1
GND2


PCI8255 EXTENSION CARD

PCI 8255/8254 B-MODULE (DCI 2K29B0)

1. PORT A/B
Pin Assignments for J8 Connector

Pin Function Pin Function
1
GND
14
+5V
2
P1A0
15
GND
3
P1A1 16
GND
4
P1A2 17
GND
5
P1A3 18
GND
6
P1A4 19
GND
7
P1A5 20
P1B3
8
P1A6 21
P1B4
9
P1A7
22
P1B5
10
P1B0 23
P1B6
11
P1B1 24
P1B7
12
P1B2 25
+5V
13
GND


2. 8254
Pin Assignments for J9 Connector

Pin Function Pin Function
1
GND
9
GND
2
CLK0
10
+12V
3
GATE0
11
CLK2
4
OUT0
12
GATE2
5
CLK1
13
OUT2
6 GATE1
14
-12V
7
OUT1
15
-5V
8
+5V


3. Pin Assignments for CHANNEL 1  Connector

Pin Function Pin Function
1
GND
2
GND
3
GND
4
P1A3
5
P1A1
6
P1A2
7
CLK0
8
P1A0
9
GATE0
10
OUT0
11
OUT2
12
CKL2
13
CKL1
14
GATE2
15
OUT1
16
GATE1
17
P1A5
18
P1A4
19
P1A7
20
P1A6
21
P1C6
22
P1C7
23
P1C4
24
P1C5
25
P1C1
26
P1C0
27
P1B7
28
P1C2
29
P1B6
30
P1C3
31
P1B5
32
P1B0
33
P1B4
34
P1B1
35
P1B3
36
P1B2
37
+5V
38
-5V
39
+12V
40
-12V


PCI 8255/8254 A-MODULE (DCI 2K29A0)



1. PORT A/B
Pin Assignments for J11 Connector

Pin Function Pin Function
1
GND
14
+5V
2
P2A0
15
GND
3
P2A1 16
GND
4
P2A2 17
GND
5
P2A3 18
GND
6
P2A4 19
GND
7
P2A5 20
P2B3
8
P2A6 21
P2B4
9
P2A7
22
P2B5
10
P2B0 23
P2B6
11
P2B1 24
P2B7
12
P2B2 25
+5V
13
GND


2. POWER SOURCE
Pin Assignments for J12 Connector

Pin Function Pin Function
1
GND
9
GND
2

10
+12V
3

11

4

12

5

13

6
14
-12V
7

15
-5V
8
+5V


3. Pin Assignments for CHANNEL 2  Connector

Pin Function Pin Function
1
GND
2
GND
3
GND
4
GND
5
GND
6
GND
7
GND
8
GND
9
GND
10
GND
11
GND
12
GND
13
P2A0
14
P2A1
15
P2A2
16
P2A3
17
P2A4
18
P2A5
19
P2A6
20
P2A7
21
P2C7
22
P2C6
23
P2C5
24
P2C4
25
P2C0
26
P2C1
27
P2C2
28
P2B7
29
P2C3
30
P2B6
31
P2B0
32
P2B5
33
P2B1
34
P2B4
35
P2B2
36
P2B3
37
+5V
38
-5V
39
+12V
40
-12V


POCKET 8 CHANNEL PHOTO-INPUT SSR OUTPUT BOARD

DCI 96022601
1.Pin Assignment of T1

Pin Function Pin Function
1
GND
14
+5V
2
DI0
15
GND
3
DI1 16
GND
4
DI2 17
GND
5
DI3 18
GND
6
DI4 19
GND
7
DI5 20
DO3
8
DI6 21
DO4
9
DI7 22
DO5
10
DO0
23
DO6
11
DO1 24
DO7
12
DO2 25
+5V
13
GND


2.Pin Assignment of TB1 (Photo Isolator)

Pin Function
1
I0H
2
I0L
3
I1H
4
I1L
5
I2H
6
I2L
7
I3H
8
I3L
9
I4H
10
I4L
11
I5H
12
I5L
13
I6H
14
I6L
15
I7H
16
I7L

3.Pin Assignment of TB2 (Relay Output)

Pin Function
1
COM0
2
OTO0
3
COM1
4
OTO1
5
COM2
6
OTO2
7
COM3
8
OTO3
9
COM4
10
OTO4
11
COM5
12
OTO5
13
COM6
14
OTO6
15
COM7
16
OTO7

@

@