SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 35
Version 1.0
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 direct 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 1 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.
TO ACCESS DATA in RAM BANK 15 (LCD RAM)
In the RAM bank 15, this area memory can be read/written by these two access methods.
Example 1: To use directly addressing mode (Through RBANK register).
B0MOV
RBANK,#0FH
; To set RAM bank = 15
MOV
A,12H
; To move content from location 12H of RAM bank 15 to ACC
Example 2: To use indirectly addressing mode with @YZ register.
MOV
A,#0FH
B0MOV
Y,A
; To set Y = 15 for accessing RAM bank 15.
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.