Chapter 4: Programming Interface
21
EPC-6A Registers
The next table lists registers in the I/O space specific to the EPC-6A. For detailed
information about each register, see Appendix C, Registers.
VMEbus Accesses
Two C-language examples are given here for performing VMEbus accesses through the
E page.
Example 1: 16-bit read from the VMEbus A16 space
This example performs a 16-bit read from the VMEbus A16 space. It requires setting the
address modifier, relocating the A16 address into the E page (address range E0000–
EFFFF), and then accessing the value pointed to by a C pointer variable.
#define WORD unsigned short
#define LWORD unsigned long
WORD addr; /* 16-bit A16 address */
WORD data;
WORD far * wptr;
outp(0x8151,0x0A); /* Set address modifier to A16 supervisory
access */
wptr = (WORD far *) (0xE00 addr);
data = *wptr; /* Read through window */
Example 2: Byte write into the VMEbus A24 space
This next example does a byte write into the VMEbus A24 space. Here the upper 8 bits of
the VME address need to be stored in the appropriate registers.
LWORD addr; /* 32-bit A24 address */
BYTE data;
BYTE far * wptr;
outp(0x8151,6 | (((addr << 8) >> 30) << 6));
/* A23–A22 and address modifier for A24 supervisory data access
EPC-6A Registers
Memory Control Register (81004h)
VME A21–16 Address Register (8130h)
ID Registers (8140h and 8141h)
Device Type Registers (8142h and 8143h)
Status/Control Registers (8144h and 8145h)
Slave Offset Registers (8146h and 9147H)
Protocol Registers (8148h and 8149h)
Response Registers (814Ah and 814Bh)
Message High Registers (814Ch and 814Dh)
Message Low Registers 814Eh and 814Fh)
VME Modifier Register (8151h)
VME Interrupt State Register (8152h)
VME Interrupt Enable Register (8153h)
VME Event State Register (8154h)
VME Event Enable Register (8155h)
Module Status/Control Register (8156h)
Interrupt Generator Register (815Fh)
FSA Address Registers 8380h)
Flash Data Register (8383h)
SRAM Data Register 8384h)
LED Register (8385h)
Register State after Reset
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com