LCD Type MCU
The following diagram illustrates the addressing/data flow of the look-up table for the HT49RU80/
HT49CU80 devices:
T B H P
T B L P
P ro g ra m
M e m o ry
T B L H
H ig h b y te o f ta b le c o n te n ts
S p e c ifie d b y [m ]
L o w
b y te o f ta b le c o n te n ts
The following example shows how the table pointer is defined and table data retrieved from the
HT49RU80/HT49CU80 devices. This example uses raw table data which is located and stored in
the Program Memory using the ORG statement. The value at this ORG statement is
²000H²,
how-
ever, this only indicates the offset value from the start address of Bank 1 which in this case is
²2000H².
The table pointer high byte is setup to have a value of
²20H²
while the value of the table
pointer low byte is setup here to have an initial value of
²05H².
This will ensure that the data byte
read from the data table will be located at the Program Memory address
²2005H²
or 5 locations af-
ter the first address defined by the ORG statement. When the
²TABRDC
[m]² instruction is exe-
cuted, the table data low byte, which has a value of
²FFH²,
will be transferred to the user-defined
temp register, while the table data high byte, which has a value of
²55H²,
will be transferred to the
TBLH register.
include HT49RU80.inc
:
:
data
.section
¢data¢
temp db ?
:
:
rombank 0 codesec0
rombank 1 codesec1
:
:
codesec0 .section at 0
¢code¢
jmp start
:
org 010h
start:
:
:
mov
a,020h
mov
tbhp,a
mov
a,005h
mov
tblp,a
tabrdc temp
nop
; Bank 0 definition
; Bank 1 definition
; setup table high byte address
;
;
;
;
;
;
setup table low byte address
table pointer address is now 2005H
read table data from PC address 2005H
²FFH²
will be placed in temp register
and
²55H²
will be placed in the TBLH
register
32
Home Index Bookmark Pages Text
Previous Next
Pages: Home Index