MOTOROLA
7-46
PARALLEL INPUT/OUTPUT
M68HC11
REFERENCE MANUAL
7.4.4 Parallel I/O Control Register (PIOC)
The PIOC register is used to configure and control the handshake I/O subsystem in
the MC68HC11A8. The following register and paragraphs describe each of the control
or status bits in greater detail.
STAF — Strobe A Flag
This status flag is a key element of the handshake I/O subsystem. Independent of the
strobe or handshake mode, STAF is always set as a result of a selected active edge
at the STRA pin. The edge at STRA, which is asynchronous to the MCU E-clock, caus-
es data to be asynchronously latched into the PORTCL register. The STAF bit is syn-
chronized to the internal PH2 clock. Provided the asynchronous edge occurs at least
a setup time before the rising edge of PH2, STAF will become set at that PH2 rising
edge. If this setup time is not met, then STAF would not be set until the next PH2. The
rising edge of PH2 corresponds to the center of the E-clock low time. The active edge
at STRA is software selectable by the EGA bit in the PIOC register.
The STAF bit is cleared by a two-step, automatic clearing sequence. The first step
arms the clearing mechanism; the second step clears STAF to zero. To arm the clear-
ing mechanism, software reads the PIOC register while the STAF bit is set to one. The
second step depends upon the strobe or handshake mode in effect. In simple strobe
mode (HNDS = 0), the second step of the clearing sequence is to read the PORTCL
register. In full-input handshake mode (HNDS = 1 and OIN = 0), the second step of the
clearing sequence is to read the PORTCL register. In full-output handshake mode
(HNDS = 1 and OIN = 1), the second step of the clearing sequence is to write to the
PORTCL register. The handshake mode can be changed between the arming and
clearing steps of this sequence. If the mode is changed, the action required for the sec-
ond step of the clearing sequence is governed by the state of HNDS and OIN at the
time the second step is performed. Although any amount of delay is permitted between
the two steps of this clearing sequence, it is best to keep the steps as close together
as possible. The arming mechanism is automatically cleared whenever the selected
edge is detected at the STRA pin. If an edge is recognized after the arming step but
before the clearing step, the internal arming signal will be negated, and the clearing
step will not clear STAF.
STAI — Strobe A Interrupt Enable
This control bit determines whether STAF will cause interrupts. When STAI is one, a
hardware interrupt request is generated whenever the STAF bit is set. When STAI is
zero, STAF interrupts are inhibited.
CWOM — Port C Wired-OR Mode
This bit is used to configure all port C outputs for wired-OR operation. When CWOM
is zero, port C outputs operate as active push-pull drivers. When CWOM is one, the
P-type pull-up devices are disabled, causing port C outputs to act as open-drain driv-
PIOC —
Parallel I/O Control Register
$1002
BIT 7
STAF
0
6
5
4
3
2
1
BIT 0
INVB
1
STAI
0
CWOM
0
HNDS
0
OIN
0
PLS
U
EGA
1
RESET: