MS51
Nov. 28, 2019 Page 276 of 491 Rev 1.00
MS51 32K SERIES TECHNICAL REFERENCE MANUAL
6.4.4 Control Registers of GPIO
The MS51 has a lot of I/O control registers to provide flexibility in all kinds of applications. The SFR
related with I/O ports can be categorized into four groups: input and output control, output mode
control, input type and sink current control, and output slew rate control. All of SFR are listed as
follows.
Input and Output Data Control 6.4.4.1
These registers are I/O input and output data buffers. Reading gets the I/O input data. Writing forces
the data output. All of these registers are bit-addressable.
Pn – Port (Bit-addressable)
80H, All pages, Bit-addressable
90H, All pages, Bit-addressable
A0H, All pages, Bit-addressable
B0H, All pages, Bit-addressable
Port n
Port n is an maximum 8-bit general purpose I/O port.
GPIO Mode Control 6.4.4.2
These registers control GPIO mode, which is configurable among four modes: input-only, quasi-
bidirectional, push-pull, or open-drain. Each pin can be configured individually.
As default after reset all GPIO setting as input only mode.
Input-only (high-impedance)