SN8P2977
8-Bit Micro-Controller with Regulator, PGIA, 24-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 62
Version 1.7
7
7
7
I/O PORT
7.1 I/O PORT MODE
The port direction is programmed by PnM register. All I/O ports can select input or output direction.
0B8H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P0M
P07M
P06M
P05M
P04M
P03M
P02M
P01M
P00M
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After reset
0
0
0
0
0
0
0
0
0C1H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P1M
-
-
-
-
-
-
P11M
P10M
Read/Write
-
-
-
-
-
-
R/W
R/W
After reset
-
-
-
-
-
-
0
0
0C2H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P2M
P27M
P26M
P25M
P24M
P23M
P22M
P21M
P20M
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After reset
0
0
0
0
0
0
0
0
0C3H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P3M
P37M
P36M
P35M
P34M
P33M
P32M
P31M
P30M
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After reset
0
0
0
0
0
0
0
0
Bit[7:0]
PnM[7:0]:
Pn mode control bits. (n = 0~1).
0 = Pn is input mode.
1 = Pn is output mode.
Note:
1. Users can program them by bit control instructions (B0BSET, B0BCLR).
2. Port 0 ~ Port 3 are bi-direction I/O port.
3. Port P2 ~ P3 is high-sink I/O Pin, It can drive seven-segment display.
7.2 I/O PIN SHARE WITH LCD FUNCTION
The microcontroller builds in LCD functions. The LCD driver output pins share with GPIO function, which can be
configured by setting PxSEG registers.
08BH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P2SEG
P27SEG
P26SEG
P25SEG
P24SEG
P23SEG
P22SEG
P21SEG
P20SEG
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After Reset
1
1
1
1
1
1
1
1
Bit[7:0]
P2nSEG:
Port 2 function control bit
0 = Set as LCD function Pin. (SEG8~SEG15)
1 = Set as IO function Pin. (P27~P20)