SN8P1700
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 39
Revision 1.93
STACK OPERATIONS
OVERVIEW
The stack buffer of SN8P1700 has 8-level high area and each level is 12-bits length. This buffer is designed to save
and restore program counter’s (PC) data when interrupt service is executed. The STKP register is a pointer designed
to point active level in order to save or restore data from stack buffer for kernel circuit. The STKnH and STKnL are the
12-bit stack buffers to store program counter (PC) data.
Figure 2-7 Stack-Save and Stack-Restore Operation
STACK BUFFER
STK7H
STK6H
STK5H
STK4H
STK3H
STK2H
STK1H
STK0H
STK7L
STK6L
STK5L
STK4L
STK3L
STK2L
STK1L
STK0L
STKP = 0
STKP = 1
STKP = 2
STKP = 3
STKP = 4
STKP = 5
STKP = 6
STKP = 7
STKP - 1
STKP + 1
CALL /
interrupt
RET /
RETI
STKP
PCH
PCL
STKP
STACK BUFFER
STK7H
STK6H
STK5H
STK4H
STK3H
STK2H
STK1H
STK0H
STK7L
STK6L
STK5L
STK4L
STK3L
STK2L
STK1L
STK0L
STK7H
STK6H
STK5H
STK4H
STK3H
STK2H
STK1H
STK0H
STK7L
STK6L
STK5L
STK4L
STK3L
STK2L
STK1L
STK0L
STKP = 0
STKP = 1
STKP = 2
STKP = 3
STKP = 4
STKP = 5
STKP = 6
STKP = 7
STKP = 0
STKP = 1
STKP = 2
STKP = 3
STKP = 4
STKP = 5
STKP = 6
STKP = 7
STKP - 1
STKP + 1
STKP - 1
STKP - 1
STKP + 1
CALL /
interrupt
RET /
RETI
STKP
STKP
PCH
PCL
PCH
PCH
PCL
PCL
STKP
STKP