
M0A21/M0A23 Series
May 06, 2022
Page
239
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
(high impedance) without output drive capability. The PIN (Px_PIN[n]) value reflects the status of the
corresponding port pins.
Each I/O pin includes an internal resistor. Set (Px_PUSEL[n]) to 1 to enable internal pull-up resistor.
Port Pin
Port Pin
V
DD
V
DD
Pull-up Enable
Pull-up Enable
Input Data
Input Data
P
P
R
R
Figure 6.5-2 Input Mode
Push-pull Output Mode
Figure 6.5-3 shows the diagram of Push-pull Output Mode. Set MODEn (Px_MODE[2n+1:2n]) to 01 as
Px.n pin is in Push-pull Output mode and the I/O pin supports digital output function with source/sink
current capability. The bit value in the corresponding DOUT (Px_DOUT[n]) is driven on the pin.
Port Pin
Port Pin
N
N
P
P
V
DD
V
DD
Port Latch Data
Port Latch Data
Input Data
Input Data
Figure 6.5-3 Push-Pull Output
Open-drain Mode
Figure 6.5-4 shows the diagram of Open-drain Mode. Set MODEn (Px_MODE[2n+1:2n]) to 10 the Px.n
pin is in Open-drain mode and the digital output function of I/O pin supports only sink current capability,
an external pull-up register is needed for driving high state. If the bit value in the corresponding DOUT
(Px_DOUT[n]) bit is 0, the pin drive a low output on the pin. If the bit value in the corresponding DOUT
(Px_DOUT[n]) bit is 1, the pin output drives high that is controlled by external pull high resistor.
Each I/O pin includes an internal resistor. Set (Px_PUSEL[2n+1:2n]) to 01 to enable internal pull-up
resistor. Internal pull-up resistor is available in Open-drain mode.