Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

SN8P1602B View Datasheet(PDF) - Sonix Technology Co., Ltd

Part Name
Description
MFG CO.
SN8P1602B
SONiX
Sonix Technology Co., Ltd SONiX
'SN8P1602B' PDF : 76 Pages View PDF
SN8P1602B
8-Bit Micro-Controller
USER RESET VECTOR ADDRESS (0000H)
A 1-word vector address area is used to execute system reset. After power on reset or watchdog timer overflow reset,
then the chip will restart the program from address 0000h and all system registers will be set as default values. The
following example shows the way to define the reset vector in the program memory.
Programming Tip: Defining Reset Vector
CHIP SN8P1602B
ORG
JMP
.
0
START
; 0000H
; Jump to user program address.
; 0004H ~ 0007H are reserved
START:
ORG
10H
.
.
.
.
ENDP
; 0010H, The head of user program.
; User program
; End of program
INTERRUPT VECTOR ADDRESS (0008H)
A 1-word vector address area is used to execute interrupt request. If any interrupt service executes, the program
counter (PC) value is stored in stack buffer and jump to 0008h of program memory to execute the vectored interrupt.
Users have to define the interrupt vector. The following example shows the way to define the interrupt vector in the
program memory.
Programming Tip: Defining Interrupt Vector (Example 1)
CHIP SN8P1602B
.DATA
.CODE
PFLAGBUF
ORG
JMP
.
0
START
; 0000H
; Jump to user program address.
; 0004H ~ 0007H are reserved
ORG
B0XCH
B0MOV
B0MOV
.
.
B0MOV
B0MOV
B0XCH
RETI
8
A, ACCBUF
A, PFLAG
PFLAGBUF, A
; Interrupt service routine
; B0XCH doesn’t change C, Z flag
; Save PFLAG register in a buffer
A, PFLAGBUF
PFLAG, A
A, ACCBUF
; Restore PFLAG register from buffer
; B0XCH doesn’t change C, Z flag
; End of interrupt service routine
START:
.
.
JMP
START
; The head of user program.
; User program
; End of user program
ENDP
; End of program
SONiX TECHNOLOGY CO., LTD
Page 15
Version 1.2
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]