|
Z86E3016PSG Datasheet, PDF (90/348 Pages) Zilog, Inc. – Z86E3016PSG | |||
|
◁ |
Z8 Family of Microcontrollers
User Manual
72
destination register. Writing to the port causes data to be stored in the
port's output register.
The port is read by specifying P1 as the source register of an instruction.
When an output is read, data on the external pins is returned. Under nor-
mal loading conditions, this is equivalent to reading the output register.
However, if Port 1 outputs are deï¬ned as open-drain, the data returned is
the value forced on the output by the external system. This may not be the
same as the data in the output register. When Port 1 is deï¬ned as an input,
reading also returns data on the external pins. However, inputs under
handshake control return data latched into the input register via the input
strobe.
Using the Port 0â1 Mode Register, Port 1 is conï¬gured as an output port
by setting bits D4 and D3 to 0, or as an input port by setting D4 to 0 and
D3 to 1 (see Figure 36).
R248 P01M
Port 0â1 Mode Register
(F8, Write-Only)
D4 D3
P10âP13 Mode
00 = Byte Output
01 = Byte Output
10 = AD0-AD7
11 = High Impedance AD0âAD7,
AS, DS, R/W,
A8âA11, A12âA15
Figure 36. Port 1 I/O Operation
I/O Ports
UM001602-0904
|
▷ |