ht82j31a Holtek Semiconductor Inc., ht82j31a Datasheet - Page 8

no-image

ht82j31a

Manufacturer Part Number
ht82j31a
Description
16 Channel A/d Mcu With Spi Interface
Manufacturer
Holtek Semiconductor Inc.
Datasheet
tempreg1
tempreg2
mov
mov
tabrdl
dec
tabrdl
org
dc
Note:
Rev. 1.00
TABRDC [m] PC11
TABRDL [m]
Instruction
PC11~PC8: Current Program Counter bits
@7~@0: Table Pointer TBLP bits
Program Memory Structure
db
db
:
:
a,06h
tblp,a
:
:
tempreg1
tblp
tempreg2
:
:
F00h
00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh
:
:
b11
1
PC10
b10
?
?
1
PC9
b9
1
; temporary register #1
; temporary register #2
; initialise table pointer - note that this address
; is referenced
; to the last page or present page
; transfers value in table referenced by table pointer
; to tempregl
; data at prog. memory address F06H transferred to
; tempreg1 and TBLH
; reduce value of table pointer by one
; transfers value in table referenced by table pointer
; to tempreg2
; data at prog.memory address F05H 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
; sets initial address of last page
PC8
b8
1
Table Location
@7
@7
b7
Table Location Bits
8
@6
@6
b6
Table Program Example
The following example shows how the table pointer and
table data is defined and retrieved from the
microcontroller. This example uses raw table data lo-
cated in the last page which is stored there using the
ORG statement. The value at this ORG statement is
within the 4K Program Memory of device. The table
pointer is setup here to have an initial value of 06H .
This will ensure that the first data read from the data ta-
ble will be at the Program Memory address F06H or 6
locations after the start of the last page. Note that the
value for the table pointer is referenced to the first ad-
dress of the present page if the TABRDC [m] instruc-
tion is being used. The high byte of the table data which
in this case is equal to zero will be transferred to the
TBLH register automatically when the TABRDL [m] in-
struction is executed.
F00H which refers to the start address of the last page
@5
@5
b5
@4
@4
b4
@3
@3
b3
@2
@2
b2
September 19, 2007
HT82J31A
@1
@1
b1
@0
@0
b0

Related parts for ht82j31a