English
Language : 

GMS81C1102 Datasheet, PDF (42/89 Pages) Hynix Semiconductor – 8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C1102 / GMS81C1202
13.2 RB and RBIO registers
RB is a 5-bit bidirectional I/O port (address C2H). Each
pin can be set individually as input and output through the
RBIO register (address C3H).
RB Data Register
RB
ADDRESS : C2H
RESET VALUE : Undefined
RB4 RB3 R B2 RB1 RB0
Pull-up Selection Register
PUPSEL
-
-
-
-
ADDRESS : CCH
RESET VALUE : ------00
PUP1 PUP0
INPUT / OUTPUT DATA
RB Direction Register
RBIO
ADDRESS : C3H
RESET VALUE : ---00000
-
-
- RB4 RB3 RB2 RB1 RB0
RB3 / INT1 Pull-up
0 : No Pull-up
1 : With Pull-up
RB2 / INT0 Pull-up
0 : No Pull-up
1 : With Pull-up
Interrupt Edge Selection Register
IEDS
ADDRESS : E6H
RESET VALUE : ----0000
DIRECTION SELECT
0 : INPUT PORT
1 : OUTPUT PORT
RB Function Selection Register
RBFUNC
ADDRESS : CBH
RESET VALUE : ---00000
PWMO INT1I INT0I BUZO AVREFS
IED1H IED1L IED0H IED0L
INT1
INT0
External Interrupt Edge Select
00 : Normal I/O port
01 : Falling ( 1-to-0 transition )
10 : Rising ( 0-to-1 transition )
11 : Both ( Rising & Falling )
0 : RB4
1 : PWM0 Output or
Compare Output
0 : RB3 0 : RB2
1 : INT1 1 : INT0
0 : RB0 when ANSEL0 = 0, AN0 when ANSEL0 = 1
1 : AVref
0 : RB1
1 : BUZ Output
The shaded areas are only related with in GMS81C1202.
So in GMS81C1102, this area must be written to “0”.
Figure 13-3 Registers of Port RB
In addition, Port RB is multiplexed with various special
features. The control register RBFUNC (address CBH)
controls to select alternate function. After reset, this value
is "0", port may be used as general I/O ports. To select al-
ternate function such as External interrupt or Timer com-
pare output, write "1" to the corresponding bit of
RBFUNC.
Regardless of the direction register RBIO, RBFUNC is se-
lected to use as alternate functions, port pin can be used as
a corresponding alternate features.
PORT RBFUNC.4~0
Description
RB4/
PWM0/
COMP0
0
RB4 ( Normal I/O Port )
1
PWM0 Output /
Timer1 Compare Output
RB3/INT1
0
RB3 ( Normal I/O Port )
1
External Interrupt Input 1
RB2/INT0
0
RB2 ( Normal I/O Port )
1
External Interrupt Input 0
RB1/BUZ
0
RB1 ( Normal I/O Port )
1
Buzzer Output
RB0/AN0/
AVref
01
RB0 ( Normal I/O Port ) /
AN0 (ANSEL0=1)
12
External Analog Reference
Voltage
1. When ANSEL0 = "0", this port is defined for normal I/O port
( RB0 ).
When ANSEL0 = "1" and ADS2~0 = " 000", this port
can be used Analog Input Port ( AN0 ).
2. When this bit set to "1", this port defined for AVref , so it can
not be used Analog Input Port AN0 and Normal I/O
Port RB0.
Jan. 2002 ver 2.0
39