
EPC-7 Hardware Reference
6. Read the data.
Data
←
value pointed to by Addr
Microsoft C code for Example 1 -
#define WORD unsigned short
#define LWORD unsigned long
WORD addr; /* 16-bit A16 address */
WORD data;
WORD far * wptr;
outp(0x8102,(inp(0x8102)|2));
/* set VME access bit */
outp(0x8130,0xFC);
outp(0x8150,0xFF);
outp(0x8151,0xCA); /* Set address modifier to A16 supervisory access */
wptr = (WORD far *) (0xE00 addr);
data = *wptr; /* Read through window */
Example #2 performs a byte (8-bit) write into the VMEbus A32 space. Here the
upper 16 bits of the VME address need to be stored in the appropriate registers.
1. Set the VME access bit in Register 8102.
2. Set register 8150 with the value corresponding to the 8 high-order address bits.
7
7
VMEbus Address bits 31-24 WA31-24
3. Determine the correct address modifier for A32 supervisory access.
4. Calculate the value and set register 8151 as follows:
VME
WA23-22
BORD
IACK
AM5
AM4
AM2
AM1
Bits 7 & 6
VME address bits 23-22
Bit 5
BORD = 0
Bit 4
IACK = 0
Bits 3-0
Bit 3 (Address Modifier bit 5)
Bit 2 (Address Modifier bit 4)
Bit 1 (Address Modifier bit 2)
Bit 0 (Address Modifier bit 1)
Page 70
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание EPC-7
Страница 125: ...Index I 7 I I Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 126: ...Index I 8 I I Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 127: ...I 5 I I Index Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 128: ...Index I 6 I I NOTES Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 129: ...Index I 7 I I Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...