SN8P1700
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 46
Revision 1.93
TO ACCESS DATA in RAM BANK 0
In the RAM bank 0, this area memory can be read/written by these three access methods.
Example 1: To use RAM bank0 dedicate instruction (Such as B0xxx instruction).
B0MOV
A, 12H
; To move content from location 12H of RAM bank 0 to ACC
Example 2: To use directly addressing mode (Through RBANK register).
B0MOV
RBANK, #00H
; To set RAM bank = 0
MOV
A, 12H
; To move content from location 12H of RAM bank 0 to ACC
Example 3: To use indirectly addressing mode with @YZ register.
CLR
Y
; To clear Y register for accessing RAM bank 0.
B0MOV
Z, #12H
; To set an immediate data 12H into Z register.
B0MOV
A, @YZ
; Use data pointer @YZ reads a data from RAM location
; 012H into ACC.
TO ACCESS DATA in RAM BANK 1
In the RAM bank 1, this area memory can be read/written by these two access methods.
Example 1: To use directly addressing mode (Through RBANK register).
B0MOV
RBANK, #01H
; To set RAM bank = 1
MOV
A, 12H
; To move content from location 12H of RAM bank 0 to ACC
Example 2: To use indirectly addressing mode with @YZ register.
MOV
A,
#01H
B0MOV
Y, A
; To set Y = 1 for accessing RAM bank 1.
B0MOV
Z, #12H
; To set an immediate data 12H into Z register.
B0MOV
A, @YZ
; Use data pointer @YZ reads a data from RAM location
; 012H into ACC.