English
Language : 

HT82B40R_14 Datasheet, PDF (11/54 Pages) Holtek Semiconductor Inc – I/O 8-Bit MCU with USB Interface
Special Purpose Data Memory
This area of Data Memory is where registers, necessary
for the correct operation of the microcontroller, are
stored. It is divided into two banks, Bank 0 and Bank1.
Most of the registers are both readable and writeable
but some are protected and are readable only, the de-
tails of which are located under the relevant Special
Function Register section. Note that for locations that
are unused, any read instruction to these addresses will
return the value ²00H².
The Special Purpose Registers for the USB interface
are stored in Bank 1 which can only be accessed by first
setting the Bank Pointer to a value of 01H and then us-
ing Indirect Addressing Register IAR1 and Memory
Pointer MP1. Bank 1 can only be accessed indirectly us-
ing the MP1 Memory Pointer, direct addressing is not
possible.
B ank0
00H
IA R 0
01H
M P0
02H
IA R 1
03H
M P1
04H
BP
05H
ACC
06H
PCL
07H
TB LP
08H
TB LH
09H
W D TS
0A H S TA TU S
0B H
IN T C
0C H
0D H
TM R 0
0E H
TM R 0C
0FH
TM R 1H
10H
TM R 1L
11H
TM R 1C
12H
PA
13H
PAC
14H
PB
15H
PBC
16H
PC
17H
PCC
18H
PD
19H
PDC
1A H
PE
1B H
PEC
1C H
1D H
1E H
1FH
TBH P
20H
USC
21H
USR
22H
SCC
23H
B ank1
40H U S B _S TA T
4 1 H P IP E _ C T R L
42H
AW R
43H
S TA LL
44H
P IP E
45H
S IE S
46H
M IS C
47H E N D P T_E N
48H
F IF O 0
49H
F IF O 1
4A H
F IF O 2
: U n u s e d re a d a s "0 "
Special Purpose Data Memory
HT82B40R/HT82B40A
Special Function Registers
To ensure successful operation of the microcontroller,
certain internal registers are implemented in the Data
Memory area. These registers ensure correct operation
of internal functions such as timers, interrupts, etc., as
well as external functions such as I/O data control. The
location of these registers within the Data Memory be-
gins at the address 00H. Any unused Data Memory lo-
cations between these special function registers and the
point where the General Purpose Memory begins is re-
served and attempting to read data from these locations
will return a value of 00H.
Indirect Addressing Register - IAR0, IAR1
The Indirect Addressing Registers, IAR0 and IAR1, al-
though having their locations in normal RAM register
space, do not actually physically exist as normal regis-
ters. The method of indirect addressing for RAM data
manipulation uses these Indirect Addressing Registers
and Memory Pointers, in contrast to direct memory ad-
dressing, where the actual memory address is speci-
fied. Actions on the IAR0 and IAR1 registers will result in
no actual read or write operation to these registers but
rather to the memory location specified by their corre-
sponding Memory Pointer, MP0 or MP1. Acting as a
pair, IAR0 and MP0 can together only access data from
Bank 0, while the IAR1 and MP1 register pair can ac-
cess data from both Bank 0 and Bank 1. As the Indirect
Addressing Registers are not physically implemented,
reading the Indirect Addressing Registers indirectly will
return a result of ²00H² and writing to the registers indi-
rectly will result in no operation.
Memory Pointer - MP0, MP1
For all devices, two Memory Pointers, known as MP0
and MP1 are provided. These Memory Pointers are
physically implemented in the Data Memory and can be
manipulated in the same way as normal registers pro-
viding a convenient way with which to address and track
data. When any operation to the relevant Indirect Ad-
dressing Registers is carried out, the actual address that
the microcontroller is directed to, is the address speci-
fied by the related Memory Pointer. MP0 can only ac-
cess data in Bank 0 while MP1 can access both banks.
Rev. 1.70
11
November 5, 2014