欢迎访问ic37.com |
会员登录 免费注册
发布采购

SN8P1602BS 参数 Datasheet PDF下载

SN8P1602BS图片预览
型号: SN8P1602BS
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-Bit Micro-Controller]
分类和应用: 微控制器
文件页数/大小: 76 页 / 430 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8P1602BS的Datasheet PDF文件第16页浏览型号SN8P1602BS的Datasheet PDF文件第17页浏览型号SN8P1602BS的Datasheet PDF文件第18页浏览型号SN8P1602BS的Datasheet PDF文件第19页浏览型号SN8P1602BS的Datasheet PDF文件第21页浏览型号SN8P1602BS的Datasheet PDF文件第22页浏览型号SN8P1602BS的Datasheet PDF文件第23页浏览型号SN8P1602BS的Datasheet PDF文件第24页  
SN8P1602B  
8-Bit Micro-Controller  
JUMP TABLE DESCRIPTION  
The jump table operation is one of multi-address jumping function. Add low-byte program counter (PCL) and ACC  
value to get one new PCL. The new program counter (PC) points to a series jump instructions as a listing table. It is  
easy to make a multi-jump program depends on the value of the accumulator (A).  
When carry flag occurs after executing of “ADD PCL, A”, it will not affect PCH register. Users have to check if the jump  
table crosses over the ROM page boundary or the listing file generated by SONIX assembly software. We suggest  
users to place the jump table at the beginning of the program memory page (xx00H) to avoid errors to occur when  
editing the program.  
Example :  
ORG  
0X0100  
; The jump table is from the head of the ROM boundary  
B0ADD  
JMP  
JMP  
JMP  
JMP  
PCL, A  
; PCL = PCL + ACC, the PCH can’t be changed.  
; ACC = 0, jump to A0POINT  
; ACC = 1, jump to A1POINT  
; ACC = 2, jump to A2POINT  
; ACC = 3, jump to A3POINT  
A0POINT  
A1POINT  
A2POINT  
A3POINT  
In following example, the jump table starts at 0x00FD. When execute B0ADD PCL, A. If ACC = 0 or 1, the jump  
table points to the right address. If the ACC is larger then 1 will cause error because PCH doesn't increase one  
automatically. We can see the PCL = 0 when ACC = 2 but the PCH still keep in 0. The program counter (PC) will  
enter the wrong address 0x0000 and the system will be in  
a unexpected operation mode. It  
is important to check whether the jump table crosses over the boundary (xxFFH to xx00H). A good coding  
style is to put the jump table at the start of ROM boundary (e.g. 0100H).  
Example (Incorrect): If the “jump table” crosses over ROM boundary, the program will cause the  
errors to occur.  
ROM Address  
.
.
.
.
.
.
0X00FD  
0X00FE  
0X00FF  
0X0100  
0X0101  
.
B0ADD  
JMP  
JMP  
JMP  
JMP  
.
PCL, A  
; PCL = PCL + ACC, the PCH can’t be changed.  
; ACC = 0  
; ACC = 1  
; ACC = 2 jump table cross boundary here  
; ACC = 3  
A0POINT  
A1POINT  
A2POINT  
A3POINT  
.
.
SONIX provides a macro for safe jump table function. This macro will check the ROM boundary and move the jump  
table to the right position automatically. The side effect of this macro maybe wastes some ROM size.  
@JMP_A  
MACRO  
IF  
VAL  
(($+1) !& 0XFF00) !!= (($+(VAL)) !& 0XFF00)  
JMP  
($ | 0XFF)  
($ | 0XFF)  
ORG  
ENDIF  
ADD  
PCL, A  
ENDM  
Note: “VAL” is the number of the jump table listing number.  
SONiX TECHNOLOGY CO., LTD  
Page 20  
Version 1.1  
 复制成功!