Chapter 4
Programming
© National Instruments Corporation
4-43
AT-DIO-32F User Manual
Data-Settling Delay
Each handshaking group has a set of bits to select a data-settling time (TDELAY) between each
transfer. For short cable lengths, this delay is usually zero. For longer cable lengths, noisy
environments, or special handshaking specifications, a longer data-settling time may be required.
This delay can also be used to lengthen the ACK pulse. Table 4-2 shows these data-settling time
settings.
Table 4-2. CFG1 Data-Settling Time Settings
Group 1
Group 2
T1S2
T1S1
T1S0
Delay (nsec)
T2S2
T2S1
T2S0
Delay (nsec)
0
0
0
0
0
0
0
0
0
0
1
100
0
0
1
100
0
1
0
200
0
1
0
200
0
1
1
300
0
1
1
300
1
0
0
400
1
0
0
500
1
1
0
600
1
1
0
600
1
1
1
700
1
1
1
700
Programmed I/O Transfers
To perform programmed I/O handshaking, the DRDY bit in the STAT Register must be polled
by software. When the bit is set, the software can then write or read data to or from the digital
I/O port. First, configure the handshaking group to be used and enable the ports to be used for
handshaking. Be sure that the direction of each group is programmed correctly. In write mode,
the external device is ready to receive data when the DRDY bit in the STAT Register is set. The
program waits until DRDY is set, then writes the data to the appropriate output port. The
circuitry handshakes the data and sets DRDY again when the external device is ready for another
transfer. In write mode, set the WRITE bit again after a reset of that group.
To perform Group 1 16-bit write-programmed I/O transfers using positive level handshaking,
follow these steps:
1. Write hex 0600 to the CFG1 Register to set up the handshaking mode.
2. Write hex 2400 to the CFG3 Register to set up the group as a write port.
3. Wait until DRDY1 becomes set (poll the STAT Register).
4. Write the 16-bit data to Port A.
5. Wait until DRDY1 becomes set, then write the next data value to Port A.
6. Repeat step 5 until all data has been written to Port A.
Содержание AT-DIO-32F
Страница 19: ......
Страница 101: ......
Страница 102: ......
Страница 123: ......
Страница 124: ......
Страница 125: ......
Страница 126: ......
Страница 127: ......
Страница 128: ......
Страница 129: ......
Страница 130: ......
Страница 131: ......
Страница 132: ......
Страница 133: ......
Страница 134: ......
Страница 135: ......
Страница 136: ......
Страница 137: ......
Страница 138: ......
Страница 139: ......
Страница 140: ......
Страница 141: ......
Страница 142: ......
Страница 143: ......