English
Language : 

GMS81C50 Datasheet, PDF (41/99 Pages) Hynix Semiconductor – 8-BIT SINGLE CHIP MICROCONTROLLERS
GMS81C50 Series
HYUNDAI
R4 Port
R4 is an 1-bit CMOS bidirectional I/O port (address
0E7H). Each I/O pin can independently used as an input or
an output through the R4DD register (address 0E8H).
R3 has internal pull-ups that is independently connected or
disconnected by R4PC (address 0FCH). The control regis-
ters for R4 are shown as below.
R4 Data Register (R/W)
R4
ADDRESS : 0E7H
RESET VALUE : Undefined
R40
R4 Direction Register (W)
R4DD
ADDRESS : 0E8H
RESET VALUE : 00H
Port Direction
0: Input
1: Output
R4 Pull-up Selection Register (W)
R4PC
ADDRESS :0FCH
RESET VALUE : 00H
Pull-up select
0: Without pull-up
1: With pull-up
R4 Open drain Assign Register (W)
ADDRESS :0E1H
RESET VALUE : 00H
R4ODC
Open drain select
0: Push-pull
1: Open drain
(1) R4 I/O Data Direction Register (R4DD)
R4 I/O Data Direction Register (R4DD) is 1-bit register,
and can assign input state or output state to each bit. If
R4DD is ``1``, port R4 is in the output state, and if ``0``, it
is in the input state. R4DD is write-only register. Since
R4DD is initialized as ``00 h`` in reset state, the whole port
R4 becomes input state.
(2) R4 Data Register (R4)
R4 data register (R4) is 1-bit register to store data of port
R4. When set as the output state by R4DD, and data is writ-
ten in R4, data is outputted into R4 pin. When set as the in-
put state, input state of pin is read. The initial value of R4
is unknown in reset state.
(3) R4 Open drain Assign Register (R4ODC)
R4 Open Drain Assign Register (R4ODC) is 1-bit register,
and can assign R4 port as open drain output port each bit,
if corresponding port is selected as output. If R4ODC is
selected as ``1``, port R4 is open drain output, and if select-
ed as ``0``, it is push-pull output. R4ODC is write-only
register and initialized as ``00 h`` in reset state.
(4) R4 Pull-up Resistor Control Register (R4PC)
R4 pull-up resistor control register (R4PC) is 1-bit register
and can control pull-up on or off each bit, if corresponding
port is selected as input. If R4PC is selected as ``1``, pull-
up ia disabled and if selected as ``0``, it is enabled. R4PC
is write-only register and initialized as ``00 h`` in reset
state. The pull-up is automatically disabled, if correspond-
ing port is selected as output.
38