English
Language : 

SN8P1700 Datasheet, PDF (117/145 Pages) SONiX Technology Company – 8-Bit Micro-Controller
SN8P1700
8-bit micro-controller build-in 12-bit ADC
I/O PORT MODE
The port direction is programmed by PnM register. Port 0 is always input mode. Port 1,2,4 and 5 can select input or
output direction.
P1M initial value = xx00 0000
0C1H
P1M
Bit 7
0
-
Bit 6
0
-
Bit 5
P15M
R/W
Bit 4
P14M
R/W
Bit 3
P13M
R/W
Bit 2
P12M
R/W
Bit 1
P11M
R/W
Bit 0
P10M
R/W
P10M~P15M: P1.0~P1.5 I/O direction control bit. 0 = input mode, 1 = output mode.
P2M initial value = 0000 0000
0C2H
P2M
Bit 7
P27M
R/W
Bit 6
P26M
R/W
Bit 5
P25M
R/W
Bit 4
P24M
R/W
Bit 3
P23M
R/W
Bit 2
P22M
R/W
Bit 1
P21M
R/W
Bit 0
P20M
R/W
P20M~P27M: P2.0~P2.7 I/O direction control bit. 0 = input mode, 1 = output mode.
P4M initial value = 0000 0000
0C4H
P4M
Bit 7
P47M
R/W
Bit 6
P46M
R/W
Bit 5
P45M
R/W
Bit 4
P44M
R/W
Bit 3
P43M
R/W
Bit 2
P42M
R/W
P40M~P47M: P4.0~P4.7 I/O direction control bit. 0 = input mode, 1 = output mode.
P5M initial value = 0000 0000
Bit 1
P41M
R/W
Bit 0
P40M
R/W
0C5H
P5M
Bit 7
P57M
R/W
Bit 6
P56M
R/W
Bit 5
P55M
R/W
Bit 4
P54M
R/W
Bit 3
P53M
R/W
Bit 2
P52M
R/W
Bit 1
P51M
R/W
Bit 0
P50M
R/W
P50M~P57M: P5.0~P5.7 I/O direction control bit. 0 = input mode, 1 = output mode.
The each bit of PnM is set to “0”, the I/O pin is input mode. The each bit of PnM is set to “1”, the I/O pin is output mode.
Input mode is with pull-up resistor controlled by setting @SET_UP macro. The output mode disables the pull-up
resistors no matter pull-up resistors is set or not.
The PnM registers are read/write bi-direction registers. Users can program them by bit control
instructions (B0BSET, B0BCLR).
SONiX TECHNOLOGY CO., LTD
Page 117
Revision 1.94