Bank Pointer - Bp - Holtek HT66F20 Manual

A/d flash mcu with eeprom
Table of Contents

Advertisement

HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
Indirect Addressing Program Example
data .section data
adres1
db ?
adres2
db ?
adres3
db ?
adres4
db ?
block
db ?
code .section at 0 code
org 00h
start:
mov a,04h
mov block,a
mov a,offset adres1
mov mp0,a
loop:
clr IAR0
inc mp0
sdz block
jmp loop
continue:
The important point to note here is that in the example shown above, no reference is made to specific
RAM addresses.
Bank Pointer – BP
Depending upon which device is used, the Program and Data Memory are divided into several
banks. Selecting the required Program and Data Memory area is achieved using the Bank Pointer.
Bit 5 of the Bank Pointer is used to select Program Memory Bank 0 or 1, while bits 0~2 are used to
select Data Memory Banks 0~4.
The Data Memory is initialised to Bank 0 after a reset, except for a WDT time-out reset in the Power
Down Mode, in which case, the Data Memory bank remains unaffected. It should be noted that the
Special Function Data Memory is not affected by the bank selection, which means that the Special
Function Registers can be accessed from within any bank. Directly addressing the Data Memory
will always result in Bank 0 being accessed irrespective of the value of the Bank Pointer. Accessing
data from banks other than Bank 0 must be implemented using Indirect addressing.
As both the Program Memory and Data Memory share the same Bank Pointer Register, care must be
taken during programming.
Device
HT66F20
HT66F40
HT66F30
HT66F50
HT66F60
Rev. 2.50
; setup size of block
; Accumulator loaded with first RAM address
; setup memory pointer with first RAM address
; clear the data at address defined by MP0
; increment memory pointer
; check if last memory location has been cleared
7
6
5
PMBP0
BP Register List
39
Bit
4
3
2
DMBP�
DMBP2
DMBP�
1
0
DMBP0
DMBP0
DMBP0
��ne 22� 20��

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT66F20 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents