SN8P1700
8-bit micro-controller build-in 12-bit ADC
PULL-UP RESISTERS
SN8P1700 series chips built-in pull-up resisters in port 0, port 1, port4 and port 5. For MASK type compatible issues,
SONIX 8-bit MCU assembler provide a @SET_PUR macro to control pull-up resisters. @SET_PUR macro only
allows enable or disable pull-up resisters as a whole port.
SN8P1702 / SN8P1704:
@SET_PUR VAL
I/O Port
VAL
Disable Pull-up
Enable Pull-up
Port 7
Bit 7
Port 6
Bit 6
Port 5
Bit 5
0
Port 4
Bit 4
0
Port 3
Bit 3
Port 2
Bit 2
Port 1
Bit 1
0
Port 0
Bit 0
0
Fixed “0” Fixed “0”
Fixed “0” Fixed “0”
1
1
1
1
SN8P1706 / SN8P1707 / SN8P1708:
@SET_PUR VAL
I/O Port
VAL
Disable Pull-up
Enable Pull-up
Port 7
Bit 7
Port 6
Bit 6
Port 5
Bit 5
0
Port 4
Bit 4
0
Port 3
Bit 3
Port 2
Bit 2
0
Port 1
Bit 1
0
Port 0
Bit 0
0
Fixed “0” Fixed “0”
Fixed “0”
1
1
1
1
1
ꢃExample 1: Enable port 0 and port 1 pull-up resisters and disable others
CHIP SN8P1708
ORG 0x10
Main:
.
.
@SET_PUR
0x03
; Enable port 0 and port 1 pull-up resisters
ꢃExample 2: Enable all pull-up resisters
CHIP SN8P1708
ORG 0x10
Main:
.
.
@SET_PUR
0x37
; Enable port 0, port 1, port 4 and port 5 pull-up resisters
Note:
a. Enable on-chip pull-up resisters of port 0 and port 1 to avoid unpredicted wakeup in sleep mode.
b. SN8P1704 and SN8P1702 must call @SET_PUR at least one time to avoid sleep mode fail.
SONiX TECHNOLOGY CO., LTD
Page 116
Revision 1.94