
HYUNDAI MicroElectronics
48
3. I/O PORTS
There are 7-ports(R0~R6) in this device. This ports are double-functional ports and the function can
be selected by program.
The direction of ports is determined by Port Direction Register.(1=output, 0=input) The data that is
written on the programmed output pin is stored in the port data register and is transferred to the
output pin. When data is input to the programmed pin. data is read not from output pin but from port
data register. therefore, previously output data can be read correctly regardless or the logical level
of the pin due to output loading.
Because the programmed input pin is floating, the value of the pin can be read correctly. When
data is written to the programmed input pin, it is written only to the port data register and the pin
remains floating.
3.1. R0 PORT
R0 Port is composed of 8-bit programmable I/O pin.
Register Name Symbol R/W Address Initial Value
R0 I/O Direction Register R0DD W 00C1
H
0000 0000
R0 PORT Data Register R0 R/W 00C0
H
Not initialized
R0 PORT I/O DIRECTION REGISTER
R0 PORT DATA REGISTER
Determines I/O of R0 port
0 : Input
1 : Output
<00C1
H
>
R0DD
7
R0DD7
6
R0DD6
5
R0DD5
4
R0DD4
3
R0DD3
2
R0DD2
1
R0DD1
0
R0DD0
W
W
W
W
W
W
W
W
Port R0 output data
<00C0
H
>
R0
7
R07
6
R06
5
R05
4
R04
3
R03
2
R02
1
R01
0
R00
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W