Electronic Components Datasheet Search
  English  ▼

X  

SN8P1602A Datasheet(PDF) 20 Page - SONiX Technology Company

Part # SN8P1602A
Description  8-Bit Micro-Controller
PDF  76 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  SONIX [SONiX Technology Company]
Direct Link  http://www.sonix.com.tw
Logo SONIX - SONiX Technology Company

SN8P1602A Datasheet(HTML) 20 Page - SONiX Technology Company

Back Button SN8P1602A Datasheet HTML 16Page - SONiX Technology Company SN8P1602A Datasheet HTML 17Page - SONiX Technology Company SN8P1602A Datasheet HTML 18Page - SONiX Technology Company SN8P1602A Datasheet HTML 19Page - SONiX Technology Company SN8P1602A Datasheet HTML 20Page - SONiX Technology Company SN8P1602A Datasheet HTML 21Page - SONiX Technology Company SN8P1602A Datasheet HTML 22Page - SONiX Technology Company SN8P1602A Datasheet HTML 23Page - SONiX Technology Company SN8P1602A Datasheet HTML 24Page - SONiX Technology Company Next Button
Zoom Inzoom in Zoom Outzoom out
 20 / 76 page
background image
SN8P1602B
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 20
Version 1.2
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
PCL, A
; PCL = PCL + ACC, the PCH can’t be changed.
JMP
A0POINT
; ACC = 0, jump to A0POINT
JMP
A1POINT
; ACC = 1, jump to A1POINT
JMP
A2POINT
; ACC = 2, jump to A2POINT
JMP
A3POINT
; ACC = 3, jump to 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
B0ADD
PCL, A
; PCL = PCL + ACC, the PCH can’t be changed.
0X00FE
JMP
A0POINT
; ACC = 0
0X00FF
JMP
A1POINT
; ACC = 1
0X0100
JMP
A2POINT
; ACC = 2
jump table cross boundary here
0X0101
JMP
A3POINT
; ACC = 3
.
.
.
.
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
VAL
IF
(($+1) !& 0XFF00) !!= (($+(VAL)) !& 0XFF00)
JMP
($ | 0XFF)
ORG
($ | 0XFF)
ENDIF
ADD
PCL, A
ENDM
Note: “VAL” is the number of the jump table listing number.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com