B-8
I/O Address Mapping
KPCI-3160 User’s Manual
Manipulating control and data registers
Be aware that software programming for a PCI board, such as the KPCI-3160, is more involved
than for an ISA board. As mentioned in the Appendix B introduction, DriverLINX eliminates the
need for user interaction with control and data registers. However, control and data registers can
be manipulated in the following special situations:
•
You are an advanced user needing to use the KPCI-3160 with an operating system other than
Microsoft Windows 95/98 or Windows NT 4.0 or greater. In this situation, you must write a
new driver. This task requires an in-depth knowledge of PCI-bus interfacing and your devel-
opment operating system.
•
You want to program the KPCI-3160 at the register level using an ActiveX hosting language.
In this situation, you may use the “Direct I/O ActiveX Automation Object” that comes with
DriverLINX. The Direct I/O ActiveX Automation Object allows you to set the control and
data registers directly and bypass the DriverLINX API, yet avoids the full complexities of
PCI bus interfacing. Refer to your DriverLINX manual for more information.
•
You want to reuse, with the KPCI-3160, an existing application program that makes port I/O
calls to an ISA-bus digital I/O board such as the PIO-96 or PIO-24. (If so, skip to “
Using
existing port I/O software to manipulate control and data registers
” at the end of
Appendix B
.)
General approach to manipulating control and data registers
This subsection outlines some general program tasks needed to use the data and control registers
of the KPCI-3160 board.
The control registers must first be set by software statements to configure each group of A, B,
and C ports for the desired direction (input or output) and to prepare interrupt control/status bits.
•
For register map A, port directions are set by writing to the combination data and control reg-
isters located at 0x0, 0x4, 0x8, and 0xC
(where 0x designates hexadecimal).
•
Use of register map B is not recommended or supported. Use only register map A.
•
If the board is to transfer and process data upon receipt of external interrupts, the following
are set:
–
Bit 12 of the interrupt control/status register, located at 0x38, is set to 1 to
configure the board for interrupt service.
–
The interrupt-pending bit and the interrupt missed bit in BADDR0 are initialized to the
cleared condition by writing 1s to interrupt control/status register status bits 17 and 23 at
38. The polarity select bit is initialized to the clear condition by writing a 0
to the interrupt control/status register control bit 6.
In most applications all eight data bits of each port will be set as either inputs or outputs. How-
ever, the upper four bits and lower four bits of port C can be configured separately as either
inputs or outputs.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание KPCI-3160
Страница 12: ...1 Overview Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 18: ...3 Installation Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 40: ...5 Troubleshooting Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 68: ...A Specifications Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 81: ...C Glossary Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...