Register-Based Programming 91Appendix B
Register Access
with Memory
Mapping
(Embedded
Controller)
When using an embedded controller, VXI A16 address space is usually
mapped to some block of memory within the controller’s addressable
memory space. See the manual for the specific embedded controller you are
using to determine where VXI Al6 is mapped. There may be other methods
of accessing the VXI backplane. The following method shows which Al6
addresses are calculated for a module.
For example, for a C-size mainframe with an E1406 Command Module,
VXI A16 address space starts at lF0000
16
. In the E1406 Command Module,
the A16 space is divided so modules are addressed only at locations
beginning with C000
16
within A16. Each module is allocated 64 register
addresses (40
16
). The module base address is related to the logical address
set by the logical address switch on the module:
(base address)
16
= (logical address)
16
* 40
16
+ C000
16
For the Form C switch, the factory-set logical address is 120 (78
16
), so to
address the Status/Control Register of a Form C switch using the E1406
Command Module:
base address = (78
16
)*(40
16
) + C000
16
= DE00
16
register address = [A16 location]
16
+ [base address]
16
+ [register offset]
16
register address = 1F0000
16
+ DE00
16
+ 04
16
= 1FDE04
16
Reading the E1442A
Registers
You can read the following Form C switch registers:
• ID Register (base + 00
16
)
• Device Type Register (base + 02
16
)
• Status/Control Register (base + 04
16
)
• Switch Enable Register for channels 0 - 15 (base + 10
16
)
• Switch Enable Register for channels 16 - 31 (base + 12
16
)
• Switch Enable Register for channels 32 - 47 (base + 14
16
)
• Switch Enable Register for channels 48 - 63 (base + 16
16
)
ID Register For the Form C switch, a read of the ID Register (base address + 00
16
)
returns FFFF
16
since the switches are manufactured by Hewlett-Packard
and are A16 only, register-based devices. The Device Type Register
(base + 02
16
) returns 0228
16
.
Device Type Register For the Form C switch, a read of the Device Type Register (base address +
02
16
) returns 0228
16
. This indicates it is a model E1442A.
Status/Control Register Each relay requires about 13 msec execution time (close to open or open to
close) during which time the switch is "busy". A read of the Status/Control
Register (base + 04
16
) returns a 1 in bit 7 when the module is not busy or
returns a 0 in bit 7 when the module is busy.
An interrupt is generated after any of the Switch Enable Registers are
written. Bit 6 of the Status Register is used to enable/disable interrupts from
the card.