![background image](http://html1.mh-extra.com/html/keithley/kpci-3160/kpci-3160_user-manual_3972188079.webp)
KPCI-3160 User’s Manual
I/O Address Mapping
B-9
Thereafter, data can be input to or output from the data registers.
•
Data ports configured as outputs are set by writing ones and zeros to these registers with
software statements.
•
Data ports configured as inputs are set by applying logical high and low signals to the input
terminals. These set values are retrieved by one of the following methods:
–
The set input values are retrieved via polling or software commands if the KPCI-3106
I/O bits are configured as general-purpose I/O bits (no external interrupt service).
–
The set input values are retrieved and processed via external interrupts if interrupt con-
trol/status-register bit 12 is set high. Refer to
Section 4
, “
External Interrupts
,” and to the
previous subsection, “
Interrupt control/status register
.”
•
If you retrieve data using interrupts, the interrupt-pending bit and interrupt-missing bit must
be cleared by software at the conclusion of each interrupt-service (ISR) by writing ones
(Acknowledge) to interrupt control/status register bits 17 and 23 at base address 0 + 0x38.
The interrupt enable bit and interrupt polarity select bit of the interrupt control/status register
are cleared by writing zeros to bits 12 and 6.
Using existing port I/O software to manipulate control and data registers
If you have a port I/O application program that was designed to work with the industry-standard
8255 and 82C55 chips, you may be able to reuse it without program modifications—under Win-
dows 95/98 only—as follows:
1. Leave the REG-MAP-SEL jumper unconnected (the default), so that the board operates in
the 8255/82C55 emulation mode under control and data register map A.
2. Using the Windows Device Manager, locate the Windows-assigned base address for your
board as follows:
a. Right-click the My Computer icon on your desktop.
b. On the menu that appears, click Properties.
c. On the System Properties dialog box that appears, click the Device Manager tab. The
Device Manager appears.
d. In the Device Manager look for a DriverLINX drivers item.
e. Under the DriverLINX drivers item, click the + sign to the left of this item.
A second level list should appear that includes the KPCI-3160 board.
f. Select the
KPCI-3160 board.
g. Click on the Properties button. A Keithley KPCI-3160 Board Properties dialog box
appears.
h. In the Keithley KPCI-3160 Board Properties dialog box click the Resources tab. A
Resource Settings list appears.
i. In the Resource Settings list, two I/O space ranges should appear, each labeled Input/
Output Range. Record the starting address of the Input/Output Range that contains
32 bytes—typically the second of the two Input/Output Range ranges. This is the
BADDR1 base address. (Refer to “
General PCI address assignments
.”)
For example, if one Input/Output Range is FCC0 - FCFF and the other is
FCA0 - FCBF, then FCA0 is the BADDR1 base address, because:
(FCBF minus FCA0)
hex
= 1F
hex
= 31
decimal
(32 bytes, counting the base-address byte)
The other Input/Output Range, starting at BADDR0, always contains 64 bytes. Follow-
ing the above example, (FCFF minus FCC0)
hex
= 31F
hex
= 63
decimal
.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com