Chapter 1 Hardware Structure
tempreg1
tempreg2
:
:
mov
mov
:
:
tabrdl tempreg1
;
;
;
;
transfers value in table referenced by table pointer
to tempregl
data at prog. memory address 706H transferred to
tempreg1 and TBLH
db
db
?
?
; temporary register #1
; temporary register #2
a,06h
tblp,a
; initialize table pointer - note that this address
; is referenced
; to the last page or present page
dec
tblp
; reduce value of table pointer by one
;
;
;
;
;
;
;
;
transfers value in table referenced by table pointer
to tempreg2
data at prog. memory address 705H transferred to
tempreg2 and TBLH
in this example the data
²1AH²
is transferred to
tempreg1 and data
²0FH²
to register tempreg2
the value
²00H²
will be transferred to the high byte
register TBLH
tabrdl tempreg2
:
:
org 700h
dc
; sets initial address of last page
; (for HT49R30A-1)
00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh
:
:
For the HT49RU80/HT49CU80 devices, there are two Table Pointer Registers known as TBLP
and TBHP in which the lower-order and higher-order address of the look-up data to be retrieved
must be respectively first written. Unlike the other devices in which only the low address byte is de-
fined using the TBLP register, the additional TBHP register allows the complete address of the
look-up table to be defined and consequently allow table data from any address and any page to
be directly accessed. For these devices, after setting up both the low and high byte table pointers,
the table data can then be retrieved from any area of Program Memory using the
²TABRDC
[m]² in-
struction or from the last page of each Program Memory Bank using the
²TABRDL
[m]² instruction.
When either of these instructions are executed, the lower-order table byte from the Program Mem-
ory will be transferred to the user-defined Data Memory register [m] as specified in the instruction.
The higher-order table data byte from the Program Memory will be transferred to the TBLH special
register. Any unused bits in this transferred higher order byte will be read as
²0².
31
Home Index Bookmark Pages Text
Previous Next
Pages: Home Index