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

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

Número de pieza
componentes Descripción
Fabricante
SN8P2606
SONiX
Sonix Technology Co., Ltd SONiX
SN8P2606 Datasheet PDF : 112 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
SN8P2608
8-Bit Micro-Controller
2.1.1.3 LOOK-UP TABLE DESCRIPTION
In the ROM’s data lookup function, Y register is pointed to middle byte address (bit 8~bit 15) and Z register is pointed
to low byte address (bit 0~bit 7) of ROM. After MOVC instruction 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”.
B0MOV
B0MOV
MOVC
Y, #TABLE1$M
Z, #TABLE1$L
; To set lookup table1’s middle address
; To set lookup table1’s low address.
; To lookup data, R = 00H, ACC = 35H
@@:
TABLE1:
INCMS
JMP
INCMS
NOP
MOVC
DW
DW
DW
Z
@F
Y
0035H
5105H
2012H
; Increment the index address for next address.
; Z+1
; Z is not overflow.
; Z overflow (FFH Æ 00), Æ Y=Y+1
;
;
; To lookup data, R = 51H, ACC = 05H.
;
; To define a word (16 bits) data.
’ Note: 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 look-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.
¾ Example: INC_YZ macro.
INC_YZ
MACRO
INCMS
Z
JMP
@F
@@:
INCMS
Y
NOP
ENDM
; Z+1
; Not overflow
; Y+1
; Not overflow
SONiX TECHNOLOGY CO., LTD
Page 16
Version 1.4

Share Link: 

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