English
Language : 

SN8P1700 Datasheet, PDF (30/145 Pages) SONiX Technology Company – 8-Bit Micro-Controller
SN8P1700
8-bit micro-controller build-in 12-bit ADC
The other coding style of loop-up table is to add Y or Z index register by accumulator. Be careful if carry happen. Refer
following example for detailed information:
Example: Increase Y and Z register by B0ADD/ADD instruction
B0MOV
B0MOV
Y, #TABLE1$M ; To set lookup table’s middle address.
Z, #TABLE1$L ; To set lookup table’s low address.
B0MOV
B0ADD
A, BUF
Z, A
; Z = Z + BUF.
B0BTS1
JMP
INCMS
NOP
FC
GETDATA
Y
; Check the carry flag.
; FC = 0
; FC = 1. Y+1.
GETDATA:
MOVC
TABLE1:
.
.
DW
0035H
DW
5105H
DW
2012H
;
; To lookup data. If BUF = 0, data is 0x0035
; If BUF = 1, data is 0x5105
; If BUF = 2, data is 0x2012
.
.
;
; To define a word (16 bits) data.
;“
;“
SONiX TECHNOLOGY CO., LTD
Page 30
Revision 1.94