EasyManua.ls Logo

Holtek HT66F30 - Bank Pointer - BP

Default Icon
294 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 2.50 38 June 22, 2017 Rev. 2.50 39 June 22, 2017
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
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 ; setup size of block
mov block,a
mova,offsetadres1 ;AccumulatorloadedwithrstRAMaddress
movmp0,a ;setupmemorypointerwithrstRAMaddress
loop:
clrIAR0 ;clearthedataataddressdenedbyMP0
inc mp0 ; increment memory pointer
sdz block ; check if last memory location has been cleared
jmp loop
continue:
Theimportantpointtonotehereisthatintheexampleshownabove,noreferenceismadetospecic
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
Bit
7 6 5 4 3 2 1 0
HT66F20
HT66F40
DMBP0
HT66F30
HT66F50
DMBP1 DMBP0
HT66F60 PMBP0 DMBP2
DMBP1 DMBP0
BP Register List

Table of Contents

Other manuals for Holtek HT66F30

Related product manuals