English
Language : 

HMS87C5216 Datasheet, PDF (33/76 Pages) List of Unclassifed Manufacturers – CMOS SINGLE-CHIP 8-BIT MICROCONTROLLER FOR UR(Universal Remocon) & WIRELESS KEYBOARD
HMS87C5216
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 dis-
connected by R4PC (address 0FCH). The control registers for R4
are shown as below.
R4 Data Register (R/W)
R4
ADDRESS : 0E7H
RESET VALUE : Undefined
R44 R43 R42 R41 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
1: Without pull-up
0: 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 re-
set 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 written in R4,
data is outputted into R4 pin. When set as the input 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 corre-
sponding port is selected as output. If R4ODC is selected as ``1``,
port R4 is open drain output, and if selected 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 se-
lected 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 automati-
cally disabled, if corresponding port is selected as output.
SEP. 2004 Ver 1.01