Chapter 3. I/O PORT
CHAPTER 3. I/O PORTS
The GMS810series has 21 I/O ports which are PORT0(8 I/O), PORT1 (8 I/O) and
PORT2 (8 I/O). Each port contains data direction register which controls I/O and data
register which stores port data.
3.1 PORT R0
3.1.1 PORT R0 Registers
REGISTER
R0 I/O Data Direction Register
R0 Data Register
SYMBOL
R0DD
R0
R/W
W
RESET VALUE
00H
ADDRESS
00C1H
R/W
Undefined
00C0H
Table 3.1 Port R0 Registers
3.1.2 I/O Data Direction Register (R0DD)
bit
7
6
5
4
3
2
1
0
R0DD7
R0DD6
R0DD5
R0DD4
R0DD3
R0DD2
R0DD1
R0DD0
R0DD
<00C1H>
initial value
R/W
0
W
0
0
0
0
0
0
0
W
W
W
W
W
W
W
R0 I/O Data Direction Register(R0DD) is 8-bit register, and can assign input state or
¡ È ¡ È ¡ È ¡ È
output state to each bit. If R0DD is
1
, port R0 is in the output state, and if , it is
0
¡ È
¡ È
in the input state. R0DD is write-only register. Since R0DD is initialized as 00H in
reset state, the whole port R0 becomes input state.
3.1.1 Data Register(R0)
bit
7
6
5
4
3
2
1
0
R07
R06
R05
R04
R03
R02
R01
R00
R0
<00C0H>
initial value
R/W
X
R/W
X
X
X
X
X
X
X
R/W
R/W
R/W
R/W
R/W
R/W
R/W
PORT0 data register (R0) is 8-bit register to store data of port R0.
When setted as the output state by R0DD, and data is written in R0, data is outputted
into R0 pin. When set as the input state, input state of pin is read.
The initial value of R0 is unknown in reset state.
3 - 1