SN8P1700
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 184
Revision 1.93
CHIP DECLARATION IN ASSEMBLER
Assembler
OTP Device Part Number
MASK Device Part Number
CHIP SN8P1702
SN8P1702
SN8A1702A
CHIP SN8P1704
SN8P1704
SN8A1704A
CHIP SN8P1706
SN8P1706
SN8A1706A
CHIP SN8P1707
SN8P1707
SN8A1707A
CHIP SN8P1708
SN8P1708
SN8A1708A
PROGRAM CHECK LIST
Item
Description
Pull-up Resister
Use @SET_PUR macro to enable or disable on-chip pull-up resisters. Refer I/O port chapter
for detailed information.
Undefined Bits
All bits those are marked as “0” (undefined bits) in system registers should be set “0” to
avoid unpredicted system errors.
ADC
Set ADC input pin I/O direction as input mode and disable pull-up resister of ADC input pin
SIO Master Mode
Set SCK (P5.0) and SO (P5.2) pin as output mode. Set SI (P5.1) pin as input mode.
SIO Slave Mode
Set SO (P5.2) pin as output mode. Set SCK (P5.0) and SI (P5.1) pin as input mode.
PWM0
Set PWM0 (P5.4) pin as output mode.
PWM1
Set PWM1 (P5.3) pin as output mode.
Interrupt
Do not enable interrupt before initializing RAM.
Non-Used I/O
Non-used I/O ports should be pull-up or pull-down in input mode, or be set as low in output
mode to save current consumption.
Sleep Mode
Enable on-chip pull-up resisters of port 0 and port 1 to avoid unpredicted wakeup.
Stack Buffer
Be careful of function call and interrupt service routine operation. Don’t let stack buffer
overflow or underflow.
System Initial
1. Write 0x7F into STKP register to initial stack pointer and disable global interrupt
2. Clear all RAM.
3. Initialize all system register even unused registers.
Noisy Immunity
1. Enable OSG and High_Clk / 2 code option together
2. Enable the watchdog option to protect system crash.
3. Non-used I/O ports should be set as output low mode
4. Constantly refresh important system registers and variables in RAM to avoid system
crash by a high electrical fast transient noise.
5. Enable the LVD option to improve the power on reset or brown-out reset performance