HT45R22E Holtek Semiconductor, HT45R22E Datasheet - Page 12

no-image

HT45R22E

Manufacturer Part Number
HT45R22E
Description
Remote Type 8-bit OTP MCU
Manufacturer
Holtek Semiconductor
Datasheet
The following diagram illustrates the addressing/data
flow of the look-up table:
Table Program Example
The accompanying example shows how the table
pointer and table data is defined and retrieved from the
device. This example uses raw table data located in the
last page which is stored there using the ORG state-
ment. The value at this ORG statement is 0F00H
which refers to the start address of the last page within
the 4K Program Memory of the 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 table will be
Note:
Rev. 1.00
TABRDC [m]
TABRDL [m]
Instruction
PC11~PC8: Current Program Counter bits
@7~@0: Table Pointer TBLP bits
PC11
b11
1
Table Read
PC10
b10
1
PC9
b9
1
PC8
b8
1
Table Location
@7
@7
b7
Table Location Bits
12
@6
@6
at the Program Memory address 0F06H or 6 locations
after the start of the last page. 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 transferred to the TBLH register
automatically when the TABRDL [m] instruction is ex-
ecuted.
Because the TBLH register is a read-only register and
cannot be restored, care should be taken to ensure its
protection if both the main routine and Interrupt Service
Routine use the table read instructions. If using the table
read instructions, the Interrupt Service Routines may
change the value of TBLH and subsequently cause er-
rors if used again by the main routine. As a rule it is rec-
ommended that simultaneous use of the table read
instructions should be avoided. However, in situations
where simultaneous use cannot be avoided, the inter-
rupts should be disabled prior to the execution of any
main routine table-read instructions. Note that all table
related instructions require two instruction cycles to
complete their operation.
b6
@5
@5
b5
@4
@4
b4
@3
@3
b3
@2
@2
b2
HT45R22E
March 17, 2010
@1
@1
b1
www.DataSheet4U.com
@0
@0
b0

Related parts for HT45R22E