- Sealevel Systems PCIO board demonstration programs - The parallel port on the Sealevel PCIO board has the ability to operate in either input or output mode. The mode of operation is controlled by jumper block E3 on the board. When enabled for normal mode, the parallel port is output only and operates like a Centronics printer port. When enabled for bi-directional mode, the port can be set for input or output mode through software. Bit D5 of port BASE+2 is used for this purpose. When bit D5 is high, the parallel port is in input mode. When bit D5 is low, the port is in output mode. To configure the parallel port as a bi-directional 8 bit I/O port, jumper E3 must have the "B" position selected. The following examples show how to toggle between input and output mode. A base address of 378 Hex is assumed: IN BASIC: STATUS=INP(&H37A) ;SET THE PORT FOR INPUT MODE OUT &H37A,(STATUS OR &H20) ;SET BIT D5 HIGH STATUS=INP(&H37A) ;SET THE PORT FOR OUTPUT MODE OUT &H37A,(STATUS AND &HDF) ;SET BIT D5 LOW IN ASSEMBLER: MOV DX,37AH ;SET THE PORT FOR INPUT MODE IN AL,DX OR AL,20H ;SET BIT D5 HIGH OUT DX,AL MOV DX,37AH ;SET THE PORT FOR OUTPUT MODE IN AL,DX AND AL,0DFH ;SET BIT D5 LOW OUT DX,AL The enclosed diskette contains the following example programs which illustrate applications that use the bi-directional port feature. 1) PCIOTX.EXE - A parallel file transfer program to be used with PCIORX.BAS 2) PCIORX.EXE - A parallel file reception program to be used with PCIOTX.BAS (source code is in PCIOTX.BAS and PCIORX.BAS) Please note that PCIORX should be running on the receiving board before PCIOTX is executed. 3) FILECOMP.EXE - Compares the contents of two files. Provided as a utility to check the results of the file transfer program. (source code is in FILECOMP.BAS) 4) INTDRIVE.COM - A low level interrupt driven monitoring program which illustrates the use of the interrupt capabilities of the PCIO. 5) INTTEST.COM - Sends a test message and data pulse to the interrupt driven monitor program for demonstration purposes. (source code is in INTDRIVE.ASM and INTTEST.ASM) ================================================================== - Cable wiring diagram for the example programs - The example programs PCIORX.BAS, PCIOTX.BAS, INTDRIVE.COM and INTTEST.COM require a board base address of 378 Hex and the following cable. ================================================================== Transmitter Receiver 2 - 2 3 - 3 4 - 4 5 - 5 6 - 6 7 - 7 8 - 8 9 - 9 10 - 16 16 - 10 25 - 25 ================================================================== The following information is presented to assist in the configuration of the Sealevel Systems PCIO board when not used as a Centronics printer port. - PCIO DB25 PARALLEL PORT PINOUT AND SIGNAL ASSIGNMENTS - BIT NUMBER PORT 76543210 DIRECTION FUNCTION ================================================================= BASE X INPUT OR OUTPUT PIN 9 STATUS OR OUTPUT LEVEL X INPUT OR OUTPUT PIN 8 STATUS OR OUTPUT LEVEL X INPUT OR OUTPUT PIN 7 STATUS OR OUTPUT LEVEL X INPUT OR OUTPUT PIN 6 STATUS OR OUTPUT LEVEL X INPUT OR OUTPUT PIN 5 STATUS OR OUTPUT LEVEL X INPUT OR OUTPUT PIN 4 STATUS OR OUTPUT LEVEL X INPUT OR OUTPUT PIN 3 STATUS OR OUTPUT LEVEL X INPUT OR OUTPUT PIN 2 STATUS OR OUTPUT LEVEL ================================================================= BASE+1 X INPUT PIN 11 STATUS X INPUT PIN 10 STATUS X INPUT PIN 12 STATUS X INPUT PIN 13 STATUS X INPUT PIN 15 STATUS XXX ------------ NOT USED ================================================================= BASE+2 XX ------------ NOT USED X OUTPUT PORT A INPUT OR OUTPUT MODE X OUTPUT IRQ ENABLE OUTPUT LEVEL X OUTPUT INVERTED PIN 17 OUTPUT LEVEL X OUTPUT PIN 16 OUTPUT LEVEL X OUTPUT INVERTED PIN 14 OUTPUT LEVEL X OUTPUT INVERTED PIN 1 OUTPUT LEVEL ================================================================== - CENTRONICS COMPATIBLE DB25 PINOUT - PIN # FUNCTION ========================= 1 STROBE / 2 DATA BIT 0 3 DATA BIT 1 4 DATA BIT 2 5 DATA BIT 3 6 DATA BIT 4 7 DATA BIT 5 8 DATA BIT 6 9 DATA BIT 7 10 ACKNOWLEDGE 11 BUSY 12 OUT OF PAPER 13 SELECT 14 AUTO FEED / 15 ERROR 16 INITIALIZE 17 SELECT INPUT / 18-25 GROUND ================================================================== The enclosed diskette contains the utility program, SSPCIO.COM which displays the current settings of COM1: - COM4: and LPT1: - LPT3: as contained in the BIOS data area. The syntax for invoking this program is : SSPCIO Below is a sample output from SSPCIO. It shows that COM1: is assigned to 3F8 hex with COM2: - COM4: unassigned. Also, it shows LPT1: assigned to 378 hex, LPT2: assigned to 3BC hex and LPT3: is unassigned. ================================================================== Sealevel(R) Display COM: and LPT: Program version 1.0 (c)Copyright Sealevel Systems, Inc., 1995 Current COM: and LPT: assignments COM1: 3F8 LPT1: 378 COM2: Not Used LPT2: 3BC COM3: Not Used LPT3: Not Used COM4: Not Used ================================================================== For further assistance, please contact Sealevel Systems at (864) 843-4343.