
GMS81C7208/7216
32
FEB. 2005 Ver 1.04
9.2 I/O Ports Configuration
R0 and R0DD Register:
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 R0DD register (address 0C8
H
).
Each port also can be set individually as pull-up port through the
R0PU (address 0D0
H
), and as open drain register through the
R0CR (address 0D4
H
).
In addition, port R0 is multiplexed with various special features.
The control register through the PMR (address 0D9
H
) and the
SIOM (address 0FE
H
) control 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, event counter
input, serial interface data input, serial interface data output or se-
rial interface clock, write “1” in the corresponding bit of PMR
(address 0D9
H
) and SIOM (address 0FE
H
).
Regardless of the direction register R0DD, the control registers of
PMR and SIOM are selected to use as alternate functions, port pin
can be used as a corresponding alternate features.
.
.
R2 and R2DD Register:
R2 is an 3-bit CMOS bidirectional I/O
port (address 0C2
H
). Each I/O pin can independently used as an
input or an output through the R2DD register (address 0CA
H
).
Each port also can be set individually as pull-up port through the
R2PU (address 0D2
H
), and as open drain register through the
R2CR (address 0D6
H
).
Port Pin
Alternate Function
R00
R01
R02
R03
R04
R05
R06
R07
INT0 (External interrupt 0)
INT1 (External interrupt 1)
INT2 (External interrupt 2)
EC0 (Event counter input 0)
EC2 (Event counter input 2)
SCK (Serial clock)
SO (Serial data output)
SI (Serial data input)
R0 Data Register
R0
ADDRESS: 0C0
RESET VALUE: 00
H
R07 R06 R05 R04 R03 R02 R01 R00
Port Direction
0: Input
1: Output
R0 Direction Register
R0DD
ADDRESS: 0C8
RESET VALUE: 00
H
Input / Output data
Port Pull-up
0: Pull-up Resistor Off
1: Pull-up Resistor On
R0 Pull-up Register
R0PU
ADDRESS: 0D0
RESET VALUE: 00
H
Port Open drain
0: Push Pull
1: Open Drain
R0 Open Drain Control Register
R0CR
ADDRESS: 0D4
RESET VALUE: 00
H
Port Mode Register
PMR
ADDRESS: 0D9
RESET VALUE: 00
H
0: R00
1: INT0
0
0: R01
1: INT1
0: R02
1: INT2
0: R03
1: EC0
0: R04
1: EC2
0: R30
1: BUZ
1
2
3
4
5
-
-
Edge Detection Register
IEDS
ADDRESS: 0D8
RESET VALUE: 00
H
0
1
2
3
4
5
-
-
INT0
INT1
INT2
External Interrupt Edge Select
00: Reserved
01: Falling (1-to-0 transition)
10: Rising (0-to-1 transition)
11: Both (Rising & Falling)