LCD Type MCU
Memory Pointers
-
MP0, MP1
All devices in the LCD range of microcontrollers contain two Memory Pointers, known as MP0 and
MP1. These Memory Pointers are physically implemented in the Data Memory and can be manipu-
lated in the same way as normal registers providing a convenient way with which to address and
track data. When any operation to the relevant Indirect Addressing Registers is carried out, the ac-
tual address that the microcontroller is directed to, is the address specified by the related Memory
Pointer. When the Bank Pointer is setup to access data from Bank 0, both the MP0 and MP1 Mem-
ory Pointers can be used to access data from Bank 0, which is the General Purpose Data Memory.
However, when the Bank Pointer is setup to access data from Bank 1, which is the LCD Data Mem-
ory, or to access data from Bank 2 or Bank 3 in the HT49RU80/HT49CU80 devices, it is important
to note that still, the Memory Pointer MP0 will only access data from Bank 0. Only Memory Pointer
MP1 can be used to access data from Bank 1, Bank 2 or Bank 3.
Note
For the HT49R30A-1/HT49R30C-1/HT49C30L devices, bit 7 of the Memory Pointers are not im-
plemented. However, it must be noted that when the Memory Pointers in these devices are read, a
value of
²1²
will be read.
The following example shows how to clear a section of four RAM locations already defined as loca-
tions adres1 to adres4.
data .section
¢data¢
adres1 db ?
adres2 db ?
adres3 db ?
adres4 db ?
block
db ?
code .section at 0
¢code¢
org 00h
start:
mov
mov
mov
mov
loop:
clr
inc
sdz
jmp
a,04h
; setup size of block
block,a
a,offset adres1 ; Accumulator loaded with first RAM address
mp0,a
; setup Memory Pointer with first RAM address
IAR0
mp0
block
loop
; clear the data at address defined by MP0
; increment Memory Pointer
; check if last memory location has been cleared
continue:
The important point to note here is that in the example shown above, no reference is made to spe-
cific RAM addresses.
38
Home Index Bookmark Pages Text
Previous Next
Pages: Home Index