| 数据搜索系统,热门电子元器件搜索 |
|
HT45F56 数据表(PDF) 16 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45F56 数据表(HTML) 16 Page - Holtek Semiconductor Inc |
|
16 / 90 page ![]() Rev. 1.11 16 April 11, 2017 Rev. 1.11 17 April 11, 2017 HT45F56 Shock Detector Flash MCU HT45F56 Shock Detector Flash MCU Theaccompanyingdiagramillustratestheaddressingdataflowofthelook-uptable. Last Page or PC High Byte TBLP Register Data 14 bits Program Memory Register TBLH User Selected Register High Byte Low Byte Table Program Example Theaccompanyingexampleshowshowthetablepointerandtabledataisdefinedandretrievedfrom thedevice.Thisexampleusesrawtabledatalocatedinthelastpagewhichisstoredthereusingthe ORGstatement.ThevalueatthisORGstatementis“300H”whichreferstothestartaddressofthe lastpagewithinthe1KProgramMemoryofthedevice.Thetablepointerlowbyteregisterissetup heretohaveaninitialvalueof“06H”.Thiswillensurethatthefirstdatareadfromthedatatable willbeattheProgramMemoryaddress“306H”or6locationsafterthestartofthelastpage.Note thatthevalueforthetablepointerisreferencedtothefirstaddressofthepresentpageifthe“TABRD [m]”instructionisbeingused.Thehighbyteofthetabledatawhichinthiscaseisequaltozerowill betransferredtotheTBLHregisterautomaticallywhenthe“TABRD[m]instructionisexecuted. BecausetheTBLHregisterisaread-onlyregisterandcannotberestored,careshouldbetaken toensureitsprotectionifboththemainroutineandInterruptServiceRoutineusetableread instructions.Ifusingthetablereadinstructions,theInterruptServiceRoutinesmaychangethe valueoftheTBLHandsubsequentlycauseerrorsifusedagainbythemainroutine.Asaruleitis recommendedthatsimultaneoususeofthetablereadinstructionsshouldbeavoided.However,in situationswheresimultaneoususecannotbeavoided,theinterruptsshouldbedisabledpriortothe executionofanymainroutinetable-readinstructions.Notethatalltablerelatedinstructionsrequire twoinstructioncyclestocompletetheiroperation. Table Read Program Example tempreg1 db ? ; temporary register #1 tempreg2 db ? ; temporary register #2 : mov a,06h ; initialise low table pointer - note that this address is referenced mov tblp,a ; to the last page or current page : tabrd tempreg1 ; transfers value in table referenced by table pointer data at program ; memory address “306H” transferred to tempreg1 and TBLH dec tblp ; reduce value of table pointer by one tabrd tempreg2 ; transfers value in table referenced by table pointer data at program ; memory address “305H” transferred to tempreg2 and TBLH in this ; example the data “1AH” is transferred to tempreg1 and data “0FH” to ; register tempreg2 : org 300h ; sets initial address of program memory dc 00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh : |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |