SN8P2318 Series
C-type LCD, RFC 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 105
Version 1.5
10.5 LCD RAM MAP
LCD dots are controlled by LCD RAM in Bank15. Program the LCD RAM data is using index pointer in bank 0 or
directly addressing in bank 15. The LCD RAM placement is by LCD segments. One segment address includes four
common bits data. COM0~COM3 is in low-nibble of one LCD RAM (bit0~bit3). The high-nibble of one LCD RAM is
useless. The LCD RAM map is as following.
RAM bank 15 address vs. Common/Segment location.
RAM
Bit
0
1
2
3
4
5
6
7
Address
LCD
COM0
COM1
COM2
COM3
-
-
-
-
00h
SEG0
00h.0
00h.1
00h.2
00h.3
-
-
-
-
01h
SEG1
01h.0
01h.1
01h.2
01h.3
-
-
-
-
02h
SEG2
02h.0
02h.1
02h.2
02h.3
-
-
-
-
03h
SEG3
03h.0
03h.1
03h.2
03h.3
-
-
-
-
.
.
.
.
.
.
-
-
-
-
.
.
.
.
.
.
-
-
-
-
.
.
.
.
.
.
-
-
-
-
0Ch
SEG12
0Ch.0
0Ch.1
0Ch.2
0Ch.3
-
-
-
-
0Dh
SEG13
0Dh.0
0Dh.1
0Dh.2
0Dh.3
-
-
-
-
0Eh
SEG14
0Eh.0
0Eh.1
0Eh.2
0Eh.3
-
-
-
-
0Fh
SEG15
0Fh.0
0Fh.1
0Fh.2
0Fh.3
-
-
-
-
10h
SEG16
10h.0
10h.1
10h.2
10h.3
-
-
-
-
.
.
.
.
.
.
-
-
-
-
.
.
.
.
.
.
-
-
-
-
.
.
.
.
.
.
-
-
-
-
1Bh
SEG27
1Bh.0
1Bh.1
1Bh.2
1Bh.3
-
-
-
-
1Ch
SEG28
1Ch.0
1Ch.1
1Ch.2
1Ch.3
-
-
-
-
1Dh
SEG29
1Dh.0
1Dh.1
1Dh.2
1Dh.3
-
-
-
-
1Eh
SEG30
1Eh.0
1Eh.1
1Eh.2
1Eh.3
-
-
-
-
1Fh
SEG31
1Fh.0
1Fh.1
1Fh.2
1Fh.3
-
-
-
-
Example : Set LCD RAM data by index pointer (@YZ) in bank 0.
B0MOV
Y, #0FH
; Set @YZ point to LCD RAM address 0x1500.
CLR
Z
MOV
A, #00001010B
; Set COM0=0, COM1=1, OCM2=0,COM3=1 of SEG 0.
B0MOV
@YZ, A
INCMS
Z
; Point to next segment address.
…
…
Example : Set LCD RAM data by directly addressing in bank 15.
MOV
A, #01
; Switch to RAM bank 15.
B0MOV
RBANK, A
MOV
A, #00001010B
; Set COM0=0, COM1=1, OCM2=0,COM3=1 of SEG 0.
MOV
00H, A
BCLR
01H.0
; Clear COM0=0 of SEG 1.
BSET
01H.1
; Clear COM1=1 of SEG 1.
…
MOV
A, #0
; Switch to RAM bank 0.
B0MOV
RBANK, A
Note: Access RAM data of bank 0 (system registers and user define RAM 0x0000~0x007F) is using
“B0xxx” instructions.