Chapter 4
Programming
©
National Instruments Corporation
4-3
The board will now be in the Sleep state where it is waiting to wake up. If
the board has been previously configured, you may wish to reset all of the
Plug and Play configuration registers with the function
Reset_PNP_Registers
. Note that resetting the registers will return the
state machine to the Wait4Key state. You will need to write the Initiation
Key to the board once more to return to the Sleep state.
The board can now be moved into the Isolation state. The Isolation state is
used to identify a single Plug and Play board from all of the boards in the
system. Since this code will only support a single Plug and Play board in
the system, no action is actually performed during the Isolation state.
The
Set_PNP_Isolation_State
will move the board from the Sleep to
the Isolation state.
Since no actions need to be performed in the Isolation state, the board can
now move into the Configuration state. The boards resource assignments
can only be made from the Configuration state, where we want to set the
base I/O address.
Set_PNP_Configuration_State
will move the board
from the Isolation to the Configuration state.
The base I/O address for the board can now be assigned. The E Series
boards use full 16 bit decoding, so both the high and low bytes of the base
I/O address must be assigned. This assignment is accomplished by running
Assign_PNP_Base_Address
.
So far there has been no feedback to the program to see if everything is
okay. The base address registers can be read to verify that they were written
correctly. First, the Read Data Port must be assigned to a free location. The
Read Data Port can be located at any location between 0x203 and 0x3FF
where the lowest two bits of the address are set, for example: 0x203, 0x207,
0x20B, …, 0x3FB, 0x3FF. You must write the value of the address right
shifted by two to the configuration register, as shown in the function
Assign_PNP_Data_Port_Address
.
You can now read the contents of the base I/O address registers with the
function
Verify_PNP_Base_Address
. These values should match those
that were written earlier in the program.
The board now needs to be activated for the assigned base I/O address to
take effect. Once activated, the board will return to the Wait4Key state.
This activation is accomplished with
Activate_PNP_Board
.
The registers for the E Series board can now be accessed by their offset
from the base I/O address that was assigned above. It is important to note
that the code given above must be repeated every time that the computer is
Содержание AT-AI-16XE-10
Страница 131: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 2 National Instruments Corporation...
Страница 132: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 3 AT MIO E Series RLPM...
Страница 133: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 4 National Instruments Corporation...
Страница 134: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 5 AT MIO E Series RLPM...
Страница 135: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 6 National Instruments Corporation...
Страница 136: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 7 AT MIO E Series RLPM...
Страница 137: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 8 National Instruments Corporation...
Страница 138: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 9 AT MIO E Series RLPM...
Страница 139: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 10 National Instruments Corporation...
Страница 140: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 11 AT MIO E Series RLPM...
Страница 141: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 12 National Instruments Corporation...
Страница 142: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 13 AT MIO E Series RLPM...
Страница 143: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 14 National Instruments Corporation...
Страница 144: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 15 AT MIO E Series RLPM...
Страница 145: ...Appendix A OKI MSM82C55A Data Sheet AT MIO E Series RLPM A 16 National Instruments Corporation...
Страница 146: ...Appendix A OKI MSM82C55A Data Sheet National Instruments Corporation A 17 AT MIO E Series RLPM...