NuMicro® NUC029LEE/NUC029SEE
32-bit Arm
®
Cortex
®
-M0 Microcontroller
Aug, 2018
Page
178
of
497
Rev 1.00
N
U
MICRO
®
N
UC02
9L
E
E
/N
UC029
S
E
E
T
E
CHN
ICA
L R
E
F
E
R
E
NC
E
M
A
NU
A
L
6.6.4.3 Open-drain Output Mode Explanation
Set GPIOx_PMD (PMDn[1:0]) to 10b as the GPIOx port [n] pin is in Open-drain mode and the
digital output function of I/O pin supports only sink current capability, an additional pull-up resistor
is needed for driving high state. If the bit value in the corresponding bit [n] of GPIOx_DOUT is 0,
the pin drive a “low” output on the pin. If the bit value in the corresponding bit [n] of GPIOx_DOUT
is 1, the pin output drives high that is controlled by external pull-up resistor.
Port Pin
Port Latch
Data
N
Input Data
Figure 6.6-2 Open-Drain Output
6.6.4.4 Quasi-bidirectional Mode Explanation
Set GPIOx_PMD (PMDn[1:0]) to 11b as the GPIOx port [n] pin is in Quasi-bidirectional mode and
the I/O pin supports digital output and input function at the same time but the source current is
only up to hundreds of uA. Before the digital input function is performed the corresponding bit in
GPIOx_DOUT must be set to 1. The Quasi-bidirectional output is common on the 80C51 and
most of its derivatives. If the bit value in the corresponding bit [n] of GPIOx_DOUT is 0, the pin
drive a “low” output on the pin. If the bit value in the corresponding bit [n] of GPIOx_DOUT is 1,
the pin will check the pin value. If pin value is high, no action takes. If pin state is low, then pin will
drive strong high with 2 clock cycles on the pin and then disable the strong output drive and then
the pin status is control by internal pull-up resistor. Note that the source current capability in
Quasi-bidirectional mode is only about 200 uA to 30 uA for V
DD
is form 5.0 V to 2.5 V.
Port Pin
2 CPU
Clock Delay
Input Data
Port Latch
Data
P
P
P
N
VDD
Strong
Very
Weak
Weak
Figure 6.6-3 Quasi-bidirectional I/O Mode