English
Language : 

GMS81C7216 Datasheet, PDF (36/121 Pages) List of Unclassifed Manufacturers – 8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C7208/7216
9.2 I/O Ports Configuration
R0 and R0DD Register: 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 R0DD register (address 0C8H).
Each port also can be set individually as pull-up port through the
R0PU (address 0D0H), and as open drain register through the
R0CR (address 0D4H).
In addition, port R0 is multiplexed with various special features.
The control register through the PMR (address 0D9H) and the
SIOM (address 0FEH) 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 0D9H) and SIOM (address 0FEH).
Port Pin
R00
R01
R02
R03
R04
R05
R06
R07
Alternate Function
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)
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.
.
R0 Data Register
ADDRESS: 0C0H
RESET VALUE: 00H
R0
R07 R06 R05 R04 R03 R02 R01 R00
Input / Output data
R0 Direction Register
R0DD
ADDRESS: 0C8H
RESET VALUE: 00H
Port Direction
0: Input
1: Output
.
R0 Pull-up Register
R0PU
ADDRESS: 0D0H
RESET VALUE: 00H
Port Pull-up
0: Pull-up Resistor Off
1: Pull-up Resistor On
R0 Open Drain Control Register ADDRESS: 0D4H
RESET VALUE: 00H
R0CR
Port Open drain
0: Push Pull
1: Open Drain
Port Mode Register
PMR - - 5 4
ADDRESS: 0D9H
RESET VALUE: 00H
3 21 0
0: R04
1: EC2
0: R30
1: BUZ
0: R00
1: INT0
0: R01
1: INT1
0: R02
1: INT2
0: R03
1: EC0
Edge Detection Register
IEDS - - 5 4 3
ADDRESS: 0D8H
RESET VALUE: 00H
21 0
INT2
INT1
INT0
External Interrupt Edge Select
00: Reserved
01: Falling (1-to-0 transition)
10: Rising (0-to-1 transition)
11: Both (Rising & Falling)
R2 and R2DD Register: R2 is an 3-bit CMOS bidirectional I/O
port (address 0C2H). Each I/O pin can independently used as an
input or an output through the R2DD register (address 0CAH).
Each port also can be set individually as pull-up port through the
R2PU (address 0D2H), and as open drain register through the
R2CR (address 0D6H).
32
FEB. 2005 Ver 1.04