ICS Advent PCI-DIO48 Series Product Manual page 27

Table of Contents

Advertisement

PCI-DIO48(S)(S) Manual
Programming Example (BASIC)
The following example in BASIC is provided as a guide to assist you in developing your working
software. In this example, the card base address is 2D0 hex and the I/O lines of group 0 are to be
setup as follows:
Port A
Port B
Port C Hi = Input
Port C Lo = Output
The first step is to configure the control register. Configure bits of the control register as:
This corresponds to 98 hex. If the card address is 2D0 hex, use the BASIC OUT command to
write to the control register as follows:
10 BASEADDR=&H2D0
20 OUT BASEADDR+3,&H98
Page 6-4
= Input
= Output
D7
D6
D5
1
0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|__________________________ Mode 0
|
|
|
|_______________________________ Mode 0
|
|___________________________________ Active Mode Set
D4
D3
D2
0
1
1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|___________ Mode 0
|
|
|
|________________ Port C Hi= input
|
|_____________________ Port A= input
D1
D0
0
0
0
|
|
|
|__Port C Lo=output
|
|______ Port B= output
Manual 00650-529-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pci-dio48s seriesPci-dio48ss series

Table of Contents