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
GENERAL PURPOSE PROGRAM MEMORY AREA
The ROM location 0009H~03FEH are used as general-purpose memory. The area is to store both instruction’s
op-code and look-up table data. The SN8P1602B includes jump table function by using program counter (PC) and
look-up table function by using ROM code registers (R, Y, Z).
The boundary of program memory is separated by the high-byte program counter (PCH) every 100H. In jump table
function and look-up table function, the program counter can’t leap over the boundary by program counter
automatically. Users need to modify the PCH value to “PCH+1” when the PCL overflows (from 0FFH to 000H).
LOOK-UP TABLE DESCRIPTION
In the ROM’s data lookup function, Y register is pointed to the bit 8~bit 15 and Z register to the bit 0~bit 7 data of ROM
address. After MOVC instruction is executed, the low-byte data will be stored in ACC and high-byte data stored in R
register.
Example: To look up the ROM data located “TABLE1”.
@@:
TABLE1:
B0MOV
B0MOV
MOVC
INCMS
JMP
INCMS
NOP
MOVC
.
DW
DW
DW
Y, #TABLE1$M
Z, #TABLE1$L
Z
@F
Y
.
0035H
5105H
2012H
; To set lookup table1’s middle address
; To set lookup table1’s low address.
; To lookup data, R = 00H, ACC = 35H
;
; Increment the index address for next address
; Z+1
; Not overflow
; Z overflow (FFH 00), Y=Y+1
;
;
; To lookup data, R = 51H, ACC = 05H.
;
; To define a word (16 bits) data.
;“
;“
CAUSION: The Y register will not increase automatically when Z register crosses boundary from 0xFF to
0x00. Therefore, user must take care such situation to avoid loop-up table errors. If Z register
overflows, Y register must be added one. The following INC_YZ macro shows a simple method to process
Y and Z registers automatically.
Note: Because the program counter (PC) is only 12-bit, the X register is useless in the application. Users
can omit “B0MOV X, #TABLE1$H”. SONiX ICE supports larger program memory addressing capability.
Please be sure that X register is “0” to avoid unpredicted error in loop-up table operation.
Example: INC_YZ Macro
INC_YZ
MACRO
INCMS
Z
JMP
@F
; Z+1
; Not overflow
@@:
INCMS
Y
NOP
ENDM
; Y+1
; Not overflow
SONiX TECHNOLOGY CO., LTD
Page 18
Version 1.2

Share Link: 

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