
Chapter 5
Programming
© National Instruments Corporation
5-3
SCXI-1160 User Manual
5. If you are writing to a Data Register, you must first write to the Address Handler address
0001 (hexadecimal):
a. Establish the desired SERDATIN level corresponding to this bit.
b. Clear SERCLK to 0.
c. Set SERCLK to 1 (clock the data). If you are using an MIO-16 board, writing to the
EXTSTROBE* register pulses EXTSTROBE* low and then high, accomplishing
steps 5b and 5c.
d. After you have written all the address bits, clear DAQD*/A to 0. This selects the Data
Register and the data on the MOSI line is written to it.
6. For each bit to be written to the Data Register:
a. Establish the desired SERDATIN level corresponding to this bit.
b. Clear SERCLK to 0.
c. Set SERCLK to 1 (clock the data). If you are using an MIO-16 board, writing to the
EXTSTROBE* register pulses EXTSTROBE* low and then high, accomplishing
steps 6b and 6c.
d. After clocking the last data bit, if you do not want to write to or read another register,
write hexadecimal address FFFF to the Address Handler to increase noise immunity of
the module when it is in the quiescent state. This also latches the data into the Data
Register. Selecting another register also latches the data in the Data Register.
7. Pull SLOT0SEL* low to deassert the SS* line and establish conditions for writing a new slot-
select number to the Slot 0 Slot-Select Register.
8. If you are not selecting another slot, write zero to the Slot 0 Slot-Select Register. If you are
selecting another slot, repeat the procedure starting at step 3.
For a timing illustration of a Data Register write, see Figure 2-11, Data Register Write Timing
Diagram.
Initialization
The SCXI-1160 powers up with its Data Register content unknown. If you reset the chassis, the
Data Register content stays unchanged and the relays maintain their previous states.
Examples
This section describes how to program the SCXI-1160, either alone or in conjunction with other
modules.
The following examples are intended to aid your understanding of module and Slot 0
programming. It will be helpful to refer to the bit descriptions for the Data Register, Status
Register, and Address Handler in Chapter 4, Register Descriptions.