User manual

PCI-1240/PCI-1240U User Manual 48
Appendix C Register Structure and
Format
C.1 Overview
The PCI-1240/PCI-1240U is delivered with an easy-to-use 32-bit DLL
driver for user programming under Windows operating system. We
advise users to
program the PCI-1240/PCI-1240U using 32-bit DLL driver provided by
Advantech to avoid the complexity of low-level programming by register.
The most important consideration in programming the PCI-1240/PCI-
1240U at the register level is to understand the function of the card’s reg-
isters. The information in the following sections is provided for users who
would like to do their own register-level programming.
C.2 I/O Port Address Map
The PCI-1240/PCI-1240U requires 20 consecutive addresses in the PC’s
I/O space. The address of each register is specified as an offset from the
card’s base address. For example, BASE+0 is the card’s base address and
BASE+8 is the base address plus eight bytes. The following sections give
the detailed information about register layout, and also the detailed infor-
mation about each register or driver and its address relative to the card’s
base address.
Table C-1 and C-2 show the function and format of each WRITE register
or driver and its address relative to the card’s base address; Table C-3 and
C-4 show the function and format of each READ register or driver and its
address relative to the card’s base address
Note All base address is in hexadecimal in Appendix C.
Users have to use a 16-bit (word) I/O command to
read/write each