Zakładka z wyszukiwarką danych komponentów |
|
HT45R4U Arkusz danych(PDF) 20 Page - Holtek Semiconductor Inc |
|
HT45R4U Arkusz danych(HTML) 20 Page - Holtek Semiconductor Inc |
20 / 105 page Rev. 1.10 �0 �a��� 1�� �01� Rev. 1.10 �1 �a��� 1�� �01� HT45R4U TinyPowerTM A/D Type e-Banking ASSP OTP MCU with LCD Table Program Example Theaccompanyingexampleshowshowthetablepointerandtabledataisdefinedandretrievedfrom thedevice.Thisexampleusesrawtabledatalocatedinthelastpagewhichisstoredthereusingthe ORGstatement.ThevalueatthisORGstatementis"3F00H"whichreferstothestartaddressofthe lastpagewithinthe16KProgramMemoryoftheHT45R4Udevice.Thetablepointerissetuphere tohaveaninitialvalueof"06H".Thiswillensurethatthefirstdatareadfromthedatatablewillbe attheProgramMemoryaddress"3F06H"or6locationsafterthestartofthelastpage.Notethatthe valueforthetablepointerisreferencedtothefirstaddressofthepresentpageifthe"TABRD[m]" instructionisbeingused.Thehighbyteofthetabledatawhichinthiscaseisequaltozerowillbe transferredtotheTBLHregisterautomaticallywhenthe"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 rombank 1 code1 ds .section 'data' tempreg1 db ? ; temporary register#1 tempreg2 db ? ; temporary register#2 : : code0 .section 'code' mov a,06h ; initialise table pointer - note that this address is referenced mov tblp,a ; to the last page or the page that tbhp pointed mov a,01fh ; initialise high table pointer mov tbhp,a ; it is not necessary to set tbhp if executing tabrdl : : tabrd tempreg1 ; transfers value in table referenced by table pointer ; to tempregl ; data at prog.memory address 1F06H transferred to ; tempreg1 and TBLH dec tblp ; reduce value of table pointer by one tabrdl tempreg2 ; transfers value in table referenced by table pointer ; to tempreg2 ; data at prog.memory address 1F05H transferred to ; tempreg2 and TBLH ; in this example the data 1AH is transferred to ; tempreg1 and data 0FH to tempreg2 ; the value 00H will be transferred to the high byte ; register TBLH : : code1 .section 'code' org 1F00h ; sets initial address of last page dc 00Ah,00Bh,00Ch,00Dh,00Eh,00Fh,01Ah,01Bh |
Podobny numer części - HT45R4U |
|
Podobny opis - HT45R4U |
|
|
Link URL |
Polityka prywatności |
ALLDATASHEET.PL |
Czy Alldatasheet okazała się pomocna? [ DONATE ] |
O Alldatasheet | Reklama | Kontakt | Polityka prywatności | Linki | Lista producentów 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 |