HT82B40A HOLTEK [Holtek Semiconductor Inc], HT82B40A Datasheet - Page 8

no-image

HT82B40A

Manufacturer Part Number
HT82B40A
Description
I/O MCU with USB Interface
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
HT82B40A-T13D
Quantity:
2 000
Program Memory
The Program Memory is the location where the user code
or program is stored. The HT82B40R is a One-Time Pro-
grammable, OTP, memory type device where users can
program their application code into the device. By using
the appropriate programming tools, OTP devices offer
users the flexibility to freely develop their applications
which may be useful during debug or for products requir-
ing frequent upgrades or program changes. OTP devices
are also applicable for use in applications that require low
or medium volume production runs. The HT82B40A is a
Mask memory type device and offers the most cost effec-
tive solution for high volume products.
Structure
The Program Memory has a capacity of 4K by 15 bits.
The Program Memory is addressed by the Program
Counter and also contains data, table information and
interrupt entries. Table data, which can be setup in any
location within the Program Memory, is addressed by
separate table pointer registers.
Special Vectors
Within the Program Memory, certain locations are re-
served for special usage such as reset and interrupts.
Note:
Rev. 1.10
TABRDC [m]
TABRDL [m]
Rotation RRA, RR, RRCA, RRC, RLA, RL, RLCA,
RLC
Increment and Decrement INCA, INC, DECA, DEC
Branch decision, JMP, SZ, SZA, SNZ, SIZ, SDZ,
SIZA, SDZA, CALL, RET, RETI
Location 000H
This area is reserved for program initialization. After
chip reset, the program always begins execution at lo-
cation 000H.
Location 004H
This area is reserved for the USB interrupt service
program. If the USB interrupt is activated, the interrupt
is enabled and the stack is not full, the program jumps
to this location and begins execution.
Location 008H
This area is reserved for the Timer/Event Counter 0 in-
terrupt service program. If a timer interrupt results
from a Timer/Event Counter 0 overflow, and if the in-
terrupt is enabled and the stack is not full, the program
jumps to this location and begins execution.
Instruction
PC11~PC8: Current Program Counter bits
@7~@0: Table Pointer TBLP bits
PC11
b11
1
PC10
b10
1
PC9
b9
1
PC8
b8
1
Table Location
@7
@7
b7
Table Location Bits
8
@6
@6
b6
TBHP register Bit 3 ~ Bit 0 when TBHP is enabled.
Location 00CH
This area is reserved for the Timer/Event Counter 1 in-
terrupt service program. If a timer interrupt results
from a Timer/Event Counter 1 overflow, and the inter-
rupt is enabled and the stack is not full, the program
jumps to this location and begins execution.
Table location
Any location in the program memory can be used as
look-up tables. There are three methods to read the
Program Memory data using two table read instruc-
tions: TABRDC and TABRDL , transfer the con-
tents of the lower-order byte to the specified data
memory, and the higher-order byte to TBLH (08H).
The three methods are shown as follows:
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 pointers, TBLP and TBHP, are read/write regis-
ters, which indicate the table location. Before
accessing the the table, the locations must be placed
Using the instruction TABRDC [m] for the current
Program Memory page, where one page=
256words, where the table location is defined by
TBLP in the current page. This is where the config-
uration option has disabled the TBHP register.
Using the instruction TABRDC [m] , where the ta-
ble location is defined by registers TBLP and TBHP.
Here the configuration option has enabled the
TBHP register.
Using the instruction TABRDL [m] , where the ta-
ble location is defined by registers TBLP in the last
page which has the address range 0F00H~0FFFH.
@5
@5
b5
Program Memory Structure
@4
@4
b4
HT82B40R/HT82B40A
@3
@3
b3
@2
@2
b2
September 4, 2009
@1
@1
b1
@0
@0
b0

Related parts for HT82B40A