![Hynix Semiconductor GMS81C5108 User Manual Download Page 35](http://html1.mh-extra.com/html/hynix-semiconductor/gms81c5108/gms81c5108_user-manual_2192989035.webp)
GMS81C5108
32
JUNE 2001 Ver 1.0
9.2 I/O Ports Configuration
R0 Ports
R0 is an 8-bit CMOS bidirectional I/O port (address
0C0
H
). Each I/O pin can independently used as an input or
an output through the R0DR register (address 0C8
H
).
R0 has internal pull-ups that is independently connected or
disconnected by R0PU. The control registers for R0 are
shown below.
In addition, Port R0 and R3 are multiplexed with various
special features. The control register PMR (address 0D9H)
controls the selection of alternate function. After reset, this
value is “0”, port may be used as normal I/O port.
To use alternate function such as External Interrupt rather
than normal I/O, write “1” in the corresponding bit of
PMR0.
.
R1 Ports
R1 is an 8-bit CMOS bidirectional I/O port (address
0C1
H
). Each I/O pin can independently used as an input or
an output through the R1DR register (address 0C9
H
).
R1 has internal pull-ups that is independently connected or
disconnected by register R1PU. If the key scan function is
used, these pin can input the key switch signal without ex-
ternal pull-up registers. For more details refer to "18. KEY
SCAN" on page 70.
The control registers for R1 are shown below.
PWMO (PWM Output)
0: R31 Port
1: PWM
R0 Data Register
R0
ADDRESS : 0C0
H
RESET VALUE : 00
H
R07
R06
R05
R04
R03
R02
R01
R00
Port Direction
R0 Direction Register
R0DR
ADDRESS : 0C8
H
RESET VALUE : 00
H
0: Input
1: Output
Pull-up select
R0 Pull-up
R0PU
ADDRESS :0D0
H
RESET VALUE : 00
H
0: Without pull-up
1: With pull-up
Open Drain select
R0 Open Drain
R0CR
ADDRESS :0D4
H
RESET VALUE : 00
H
0: No Open Drain
1: Open Drain
Port Mode Register
PMR
ADDRESS :0D9
H
RESET VALUE : -0-00000
B
-
PWMO
-
BUZ
EC0
INT2
INT1
INT0
BUZ (Buzzer Output)
0: R04 Port
1: BUZ
EC0 (Timer0 Event Input)
0: R03 Port
1: EC0
INT2 (External Interrupt)
0: R02 Port
1: INT2
INT1 (External Interrupt)
0: R01 Port
1: INT1
INT0 (External Interrupt)
0: R00 Port
1: INT0
Selection Register
Selection Register
Port Pin
Alternate Function
R00
R01
R02
R03
R04
R31
INT0 (External Interrupt 0)
INT1 (External Interrupt 1)
INT2 (External Interrupt 2)
EC0 (Timer0 Event Input)
BUZ (Buzzer Output)
PWM (PWM Output)
R1 Data Register
R1
ADDRESS : 0C1
H
RESET VALUE : 00
H
Port Direction
R1 Direction Register
R1DR
ADDRESS : 0C9
H
RESET VALUE : 00
H
0: Input
1: Output
Pull-up select
R1 Pull-up
R1PU
ADDRESS : 0D1
H
RESET VALUE : 00
H
0: Without pull-up
1: With pull-up
R17
R16
R15
R14
R13
R12
R11
R10
Open Drain select
R1 Open Drain
R1CR
ADDRESS :0D5
H
RESET VALUE : 00
H
0: No Open Drain
1: Open Drain
KEY Input select
KEY SCAN Mode Register
KSMR
ADDRESS :0F0
H
RESET VALUE : 00
H
0: Port selection
1: KS selection
Selection Register
Selection Register
Downloaded from
Elcodis.com
electronic components distributor