English
Language : 

GMS81C5108 Datasheet, PDF (35/102 Pages) Hynix Semiconductor – HYNIX SEMICONDUCTOR INC. 8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C5108
9.2 I/O Ports Configuration
R0 Ports
R0 is an 8-bit CMOS bidirectional I/O port (address
0C0H). Each I/O pin can independently used as an input or
an output through the R0DR register (address 0C8H).
R0 has internal pull-ups that is independently connected or
disconnected by R0PU. The control registers for R0 are
shown below.
R0 Data Register
ADDRESS : 0C0H
RESET VALUE : 00H
R0
R07 R06 R05 R04 R03 R02 R01 R00
R0 Direction Register
R0DR
R0 Pull-up
Selection Register
R0PU
R0 Open Drain
Selection Register
R0CR
ADDRESS : 0C8H
RESET VALUE : 00H
Port Direction
0: Input
1: Output
ADDRESS :0D0H
RESET VALUE : 00H
Pull-up select
0: Without pull-up
1: With pull-up
ADDRESS :0D4H
RESET VALUE : 00H
Open Drain select
0: No Open Drain
1: Open Drain
Port Mode Register
PMR
- PWMO -
ADDRESS :0D9H
RESET VALUE : -0-00000B
BUZ EC0 INT2 INT1 INT0
PWMO (PWM Output)
0: R31 Port
1: PWM
EC0 (Timer0 Event Input)
0: R03 Port
1: EC0
INT1 (External Interrupt)
0: R01 Port
1: INT1
BUZ (Buzzer Output)
0: R04 Port
1: BUZ
INT2 (External Interrupt)
0: R02 Port
1: INT2
INT0 (External Interrupt)
0: R00 Port
1: INT0
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.
.
Port Pin
Alternate Function
R00 INT0 (External Interrupt 0)
R01 INT1 (External Interrupt 1)
R02 INT2 (External Interrupt 2)
R03 EC0 (Timer0 Event Input)
R04 BUZ (Buzzer Output)
R31 PWM (PWM Output)
R1 Ports
R1 is an 8-bit CMOS bidirectional I/O port (address
0C1H). Each I/O pin can independently used as an input or
an output through the R1DR register (address 0C9H).
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.
R1 Data Register
ADDRESS : 0C1H
RESET VALUE : 00H
R1
R17 R16 R15 R14 R13 R12 R11 R10
R1 Direction Register
R1DR
ADDRESS : 0C9H
RESET VALUE : 00H
Port Direction
0: Input
1: Output
R1 Pull-up
Selection Register
R1PU
R1 Open Drain
Selection Register
R1CR
KEY SCAN Mode Register
KSMR
ADDRESS : 0D1H
RESET VALUE : 00H
Pull-up select
0: Without pull-up
1: With pull-up
ADDRESS :0D5H
RESET VALUE : 00H
Open Drain select
0: No Open Drain
1: Open Drain
ADDRESS :0F0H
RESET VALUE : 00H
KEY Input select
0: Port selection
1: KS selection
32
JUNE 2001 Ver 1.0