ht82k70e-l Holtek Semiconductor Inc., ht82k70e-l Datasheet - Page 9

no-image

ht82k70e-l

Manufacturer Part Number
ht82k70e-l
Description
I/o Type 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
Rev. 1.00
Note:
TABRDC [m]
TABRDL [m]
Only the destination of the lower-order byte in the ta-
ble is well-defined, the other bits of the table word are
transferred to the lower portion of TBLH, and the re-
maining 1-bit words are read as 0 . The Table
Higher-order byte register (TBLH) is read only. The ta-
ble pointer (TBLP, TBHP) is a read/write register,
which indicates the table location. Before accessing
the table, the location must be placed in the TBLP and
TBHP (If the configuration option TBHP is disabled,
the value in TBHP has no effect). The TBLH is read
only and cannot be restored. If the main routine and
the ISR (Interrupt Service Routine) both employ the
table read instruction, the contents of the TBLH in the
main routine are likely to be changed by the table read
instruction used in the ISR. Errors can occur. In other
words, using the table read instruction in the main rou-
tine and the ISR simultaneously should be avoided.
However, if the table read instruction has to be applied
in both the main routine and the ISR, the interrupt
should be disabled prior to the table read instruction. It
will not be enabled until the TBLH has been backed
up. All table related instructions require two cycles to
complete the operation. These areas may function as
normal program memory depending on the require-
ments.
Once Configuration option is enabled, the instruction
TBLP and TBHP value. Otherwise, the Configuration
option TBHP is disabled, the instruction TABRDC
[m] reads the ROM data as defined by TBLP and the
current program counter bits.
The following diagram illustrates the addressing/data
flow of the look-up table:
Instruction
TABRDC [m] reads the ROM data as defined by
PC12~PC8: Current Program Counter bits when Configuration option TBHP is disable
@7~@0: Table Pointer TBLP bits
For the HT82K70E-L, the table address location is 12 bits wide, i.e. from b11 ~ b0
For the HT82K76E-L, the table address location is 13 bits wide, i.e. from b12 ~ b0
Table Read - TBLP only
PC12 PC11 PC10
b12
1
b11
1
b10
1
PC9
b9
1
PC8
b8
1
Table Location
Table Location Bits
@7
@7
b7
9
Table Program Example
The following example, for the HT82K76E-L, shows
how the table pointer and table data is defined and re-
trieved from the microcontroller. This example uses raw
table data located in the last page which is stored there
using the ORG statement. The value at this ORG state-
ment is 1F00H which refers to the start address of the
last page within the 8K Program Memory of device. The
table pointer is setup here to have an initial value of
data table will be at the Program Memory address
Note that the value for the table pointer is referenced to
the first address of the present page if the TABRDC
[m] instruction is being used. The high byte of the table
data which in this case is equal to zero will be trans-
ferred to the TBLH register automatically when the
06H . This will ensure that the first data read from the
1F06H or 6 locations after the start of the last page.
TABRDL [m] instruction is executed.
@6
@6
b6
@5
@5
b5
Table Read - TBLP/TBHP
HT82K70E-L/HT82K76E-L
@4
@4
b4
@3
@3
b3
@2
@2
b2
September 15, 2009
@1
@1
b1
@0
@0
b0

Related parts for ht82k70e-l