xPC Target |
 |
I/O Port Write
Intel 80x86 and compatible processors have a special address space reserved for I/O devices. To access this address space and communicate directly to a device, xPC Target provides the I/O Port Read and I/O Port Write blocks. These blocks enable the transfer of data from and to the I/O ports. See also, I/O Port Read.
- Double click the I/O Port Write block.
- The Block Parameters: I/O Port Write dialog box opens.
- Enter the parameters.
- For example, if you want to write a double word (32 bits) starting at I/O port
0x300
, followed by a word (16 bits) at 0x304
, enter
Your dialog box should look similar to the figure shown below.

- Click OK.
- The number of inputs to the block changes to reflect the length of the
I/O-Port address cell array. The data type of the input signal reflects the type of value written to the I/O port.For example, an input signal of type uint32
writes a double word, an uint16
input signal writes a word, and an uint8 input signal writes a byte.
Block Parameters
|
Description
|
I/O-Port address (cell array)
|
This is the cell array containing the I/O port addresses for the data that you want read. These addresses are specified in terms of hexadecimal strings.
|
Sample time
|
Enter a base sample time or a multiple of the base sample time.
|
| I/O Port Read | | xPC Target TET |  |