Preliminary
SN8P1702A/SN8P1703A
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 = xxxx xx00
0C1H
P1M
Bit 7
0
-
Bit 6
0
-
Bit 5
0
-
Bit 4
0
-
Bit 3
0
-
Bit 2
0
-
Bit 1
P11M
R/W
Bit 0
P10M
R/W
Bit[1:0]
P1[1:0]M:P1.0~P1.1 I/O direction control bit.
0 = input mode
1 = output mode.
P4M initial value = xxxx 0000
0C4H
P4M
Bit 7
0
-
Bit 6
0
-
Bit 5
0
-
Bit 4
0
-
Bit 3
P43M
R/W
Bit 2
P42M
R/W
Bit 1
P41M
R/W
Bit 0
P40M
R/W
Bit[3:0]
P4[3:0]M:P4.0~P4.3 I/O direction control bit.
0 = input mode
1 = output mode.
P5M initial value = xx00 0000
0C5H
P5M
Bit 7
0
-
Bit 6
0
-
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
Bit[5:0]
P5[5:0]M: P5.0~P5.5 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 90
Revision 0.5