National Instruments 6508 PCI-DIO-96 User Manual

Page 48

Advertising
background image

Chapter 6

Programming

PCI-DIO-96 User Manual

6-2

© National Instruments Corporation

Before you can implement any of the examples into a real application,
you must know the base memory address for your board. To generate
and process any interrupts, you must write and install an applicable
interrupt service routine.

Note:

In this chapter all numbers preceded by 0x are hexadecimal

Common terms that you will see used in the programming examples are
listed below:

Port A

Address of PPI A Port A Register
(Base Address + 0x00)

Port B

Address of PPI A Port B Register
(Base Address + 0x01)

Port C

Address of PPI A Port C Register
(Base Address + 0x02)

8255Cnfg

Address of PPI A Configuration
Register
(Base Address + 0x03)

Ctr0

Address of 82C53 Counter 0 Register
(Base Address + 0x10)

Ctr1

Address of 82C53 Counter 1 Register
(Base Address + 0x11)

CntrCnfg

Address of 82C53 Configuration
Register (Base Address + 0x13)

IREG1

Address of Interrupt Control Register 1
(Base Address + 0x14)

IREG2

Address of Interrupt Control Register 2
(Base Address + 0x15)

Write (address, data)

Generic function call for a memory
space Write of data to address

Read (address)

Generic function call for a memory
space Read from address

CWrite (offset, data)

PCI configuration space write of data to
PCI configuration space offset

Advertising