DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

SN8P1602B Ver la hoja de datos (PDF) - Sonix Technology Co., Ltd

Número de pieza
componentes Descripción
Fabricante
SN8P1602B
SONiX
Sonix Technology Co., Ltd SONiX
SN8P1602B Datasheet PDF : 76 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
SN8P1602B
8-Bit Micro-Controller
Programming Tip: Defining Interrupt Vector (Example 2)
CHIP SN8P1602B
.DATA
.CODE
PFLAGBUF
ORG
JMP
.
0
START
; 0000H
; Jump to user program address.
; 0001H ~ 0007H are reserved
ORG
JMP
08
MY_IRQ
; 0008H, Jump to interrupt service routine address
START:
ORG
.
.
.
JMP
10H
START
; 0010H, The head of user program.
; User program
; End of user program
MY_IRQ:
B0XCH
B0MOV
B0MOV
.
.
B0MOV
B0MOV
B0XCH
RETI
A, ACCBUF
A, PFLAG
PFLAGBUF, A
;The head of 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
ENDP
; End of program
Remark: It is easy to understand the rules of SONIX program from demo programs given above. These
points are as following:
1. The address 0000H is a “JMP” instruction to make the program starts from the beginning.
2. The 0004H~0007H are reserved. Users is NOT allow to use 0004H~0007H addresses. The default
value might change from time to time during various production progress. We strongly suggest
users DO NOT take this value into the Check Sum. For detailed information, please check the
following Checksum Calculation section
SONiX TECHNOLOGY CO., LTD
Page 16
Version 1.2

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]