the port is not protected and can be overwritten by the Z8 CPU during the handshake
sequence. To avoid losing data, the software must not overwrite the port until the corre-
sponding interrupt request indicates that the external device has latched the data.
The software can always read Port 3 output and input handshake lines, but cannot write to
the output handshake line.
The following is the recommended setup sequence when configuring a Port for handshake
operation for the first time after a reset:
•
Load P01M or P2M to configure the port for input/output
•
Load P3 to set the Output Handshake bit to a logic 1
•
Load P3M to select HANDSHAKE mode for the port
Once a data transfer begins, the configuration of the handshake lines should not be
changed until the handshake is completed.
Figure 50
sequence.
DAV
(Input To Z8)
RDY
Output From Z8)
Data on Port
(Input To Z8)
State 1.
Port 3 output is High, indicating that the I/O device is ready to accept data.
The I/O device puts data on the port and then activates the DAV input. This causes the data to be latched
State 2.
.
into the port input register and generates an interrupt request.
State 3.
The Z8
State 4.
The I/O device returns the DAV line High in response to RDY going Low.
The Z8 CPU RR software must respond to the interrupt request and read the contents of the port in order for the
State 5.
handshake sequence to be completed. The RDY line goes High if and only if the port has been read and
DAV is High. This returns the interface to its initial state.
UM001604-0108
and
Figure 51
on page 65 display detailed operation for the handshake
1
2
®
CPU forces the Ready (RDY) output Low, signaling to the I/O device that the data has been latched.
Figure 50. Z8 Input Handshake
3
Valid Data
®
Z8
User Manual
4
5
Input/Output Ports
CPU
64
Need help?
Do you have a question about the Z8 Series and is the answer not in the manual?