欢迎访问ic37.com |
会员登录 免费注册
发布采购

HT45FH4M 参数 Datasheet PDF下载

HT45FH4M图片预览
型号: HT45FH4M
PDF下载: 下载PDF文件 查看货源
内容描述: 锂电池备用电源ASSP MCU [Lithium Battery Backup Power ASSP MCU]
分类和应用: 电池
文件页数/大小: 138 页 / 5461 K
品牌: HOLTEK [ HOLTEK SEMICONDUCTOR INC ]
 浏览型号HT45FH4M的Datasheet PDF文件第15页浏览型号HT45FH4M的Datasheet PDF文件第16页浏览型号HT45FH4M的Datasheet PDF文件第17页浏览型号HT45FH4M的Datasheet PDF文件第18页浏览型号HT45FH4M的Datasheet PDF文件第20页浏览型号HT45FH4M的Datasheet PDF文件第21页浏览型号HT45FH4M的Datasheet PDF文件第22页浏览型号HT45FH4M的Datasheet PDF文件第23页  
HT45FH4M  
Lithium Battery Backup Power ASSP MCU  
Table Program Example  
Theꢀfollowingꢀexampleꢀshowsꢀhowꢀtheꢀtableꢀpointerꢀandꢀtableꢀdataꢀisꢀdefinedꢀandꢀretrievedꢀfromꢀtheꢀ  
microcontroller.ꢀThisꢀexampleꢀusesꢀrawꢀtableꢀdataꢀlocatedꢀinꢀtheꢀProgramꢀMemoryꢀwhichꢀisꢀstoredꢀ  
thereꢀusingꢀtheꢀORGꢀstatement.ꢀTheꢀvalueꢀatꢀthisꢀORGꢀstatementꢀisꢀ“700H”ꢀwhichꢀrefersꢀtoꢀtheꢀstartꢀ  
addressꢀofꢀtheꢀlastꢀpageꢀwithinꢀtheꢀ2Kꢀwordsꢀ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ꢀatꢀtheꢀProgramꢀMemoryꢀaddressꢀ“706H”ꢀ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ꢀ  
“TABRDꢀ[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ꢀ“TABRDꢀ[m]”ꢀinstructionꢀisꢀ  
executed.  
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ꢀtableꢀreadꢀ  
instructions.ꢀIfꢀusingꢀtheꢀtableꢀreadꢀinstructions,ꢀtheꢀInterruptꢀServiceꢀRoutinesꢀmayꢀchangeꢀtheꢀ  
valueꢀofꢀtheꢀTBLHꢀandꢀsubsequentlyꢀcauseꢀerrorsꢀifꢀusedꢀagainꢀbyꢀtheꢀmainꢀroutine.ꢀAsꢀaꢀruleꢀitꢀisꢀ  
recommendedꢀthatꢀsimultaneousꢀuseꢀofꢀtheꢀtableꢀreadꢀinstructionsꢀshouldꢀbeꢀavoided.ꢀHowever,ꢀinꢀ  
situationsꢀwhereꢀsimultaneousꢀuseꢀcannotꢀbeꢀavoided,ꢀtheꢀinterruptsꢀ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.  
Table Read Program Example  
tempreg1 db ?  
; temporary register #1  
tempreg2 db ?  
; temporary register #2  
:
:
mov a,06h  
mov tblp,a  
mov a,07h  
mov tbhp,a  
:
; initialise low table pointer - note that this address is referenced  
; initialise high table pointer  
:
tabrd tempreg1  
; transfers value in table referenced by table pointer data at program  
; memory address “706H” transferred to tempreg1 and TBLH  
; reduce value of table pointer by one  
dec tblp  
tabrd tempreg2  
; transfers value in table referenced by table pointer data at program  
; memory address “705H” transferred to tempreg2 and TBLH in this  
; example the data “1AH” is transferred to tempreg1 and data “0FH” to  
; register tempreg2  
:
:
org 700h  
; sets initial address of program memory  
dc 00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh  
:
:
Rev. 1.10  
19  
�anꢀaꢁꢂ 1ꢃꢄ ꢅ01ꢆ  
 复制成功!