GMS81508B HYNIX [Hynix Semiconductor], GMS81508B Datasheet - Page 34

no-image

GMS81508B

Manufacturer Part Number
GMS81508B
Description
HYUNDAI MICRO ELECTRONICS 8-BIT SINGLE-CHIP MICROCONTROLLERS
Manufacturer
HYNIX [Hynix Semiconductor]
Datasheet
HYUNDAI MicroElectronics
9. I/O PORTS
The GMS815xxB has seven ports (R0, R1, R2, R4, R5, and
R6).These ports pins may be multiplexed with an alternate
function for the peripheral features on the device.
All pins have data direction registers which can define
these ports as output or input. A “1” in the port direction
register configure the corresponding port pin as output.
Conversely, write “0” to the corresponding bit to specify it
as input pin. For example, to use the even numbered bit of
R0 as output ports and the odd numbered bits as input
ports, write “55
ister) during initial setting as shown in Figure 9-1.
All the port direction registers in the GMS815xxB have 0
written to them by reset function. On the other hand, its in-
itial status is input.
R0 and R0DD register: R0 is an 8-bit CMOS bidirection-
al I/O port (address 0C0
used as an input or an output through the R0DD register
(address 0C1
DEC. 1999 Ver 1.04
R0 Data Register
R0
R0 Direction Register
R0DD
0C0
0C1
0C2
0C3
Figure 9-1 Example of port I/O assignment
H
H
H
H
R0 direction
R1 direction
WRITE “55
R0 data
R1 data
H
R07 R06 R05 R04 R03 R02 R01 R00
).
H
” to address 0C1
H
” TO PORT R0 DIRECTION REGISTER
H
). Each I/O pin can independently
7 6 5 4 3 2 1 0
0 1 0 1 0 1 0 1
7 6 5 4 3 2 1 0
I O I O I O I O
O: OUTPUT PORT
Input / Output data
I: INPUT PORT
Port Direction
0: Input
1: Output
H
ADDRESS: 0C0
RESET VALUE: Undefined
ADDRESS: 0C1
RESET VALUE: 00
(R0 port direction reg-
PORT
BIT
H
H
H
R1 and R1DD register: R1 is an 8-bit CMOS bidirection-
al I/O port (address 0C2
used as an input or an output through the R1DD register
(address 0C3
R2 and R2DD register: R2 is an 8-bit CMOS bidirection-
al I/O port (address 0C4
used as an input or an output through the R2DD register
(address 0C5
R1 Data Register
R1
R2 Data Register
R2
R1 Direction Register
R1DD
R2 Direction Register
R2DD
H
R17 R16 R15 R14 R13 R12 R11 R10
H
R27 R26 R25 R24 R23 R22 R21 R20
).
).
H
H
). Each I/O pin can independently
). Each I/O pin can independently
GMS81508B/16B/24B
Input / Output data
Input / Output data
Port Direction
0: Input
1: Output
Port Direction
0: Input
1: Output
ADDRESS: 0C2
RESET VALUE: Undefined
ADDRESS: 0C4
RESET VALUE: Undefined
ADDRESS: 0C3
RESET VALUE: 00
ADDRESS: 0C5
RESET VALUE: 00
H
H
H
H
H
H
31

Related parts for GMS81508B