| Electronic Components Datasheet Search |
|
HT45F5N Datasheet(PDF) 29 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45F5N Datasheet(HTML) 29 Page - Holtek Semiconductor Inc |
|
29 / 202 page ![]() Rev. 1.00 �� �ove��e� 1�� �01� Rev. 1.00 �9 �ove��e� 1�� �01� HT45F5N/HT45FH5N Power Bank ASSP Flash MCU HT45F5N/HT45FH5N Power Bank ASSP Flash MCU Last Page o� TBHP Registe� TBLP Registe� P�og�a� Me�o�y Registe� TBLH Use� Selected Registe� Data 1� �its High Byte Low Byte Table Program Example Thefollowingexampleshowshowthetablepointerandtabledataisdefinedandretrievedfrom themicrocontroller.ThisexampleusesrawtabledatalocatedintheProgramMemorywhichis storedthereusingtheORGstatement.ThevalueatthisORGstatementis"0F00H"whichrefersto thestartaddressofthelastpagewithinthe4KProgramMemoryofthemicrocontroller.Thetable pointerlowbyteregisterissetupheretohaveaninitialvalueof"06H".Thiswillensurethatthefirst datareadfromthedatatablewillbeattheProgramMemoryaddress"F06H"or6locationsafterthe startofthespecifiedpage.Notethatthevalueforthetablepointerisreferencedtothefirstaddress specifiedbyTBLPandTBHPifthe"TABRD[m]"or"LTABRD[m]"instructionisbeingused.The highbyteofthetabledatawhichinthiscaseisequaltozerowillbetransferredtotheTBLHregister automaticallywhenthe"TABRD[m]"or"LTABRD[m]"instructionisexecuted. BecausetheTBLHregisterisaread/writeregisterandcanberestored,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 the page that tbhp pointed mov a,0Fh ; initialise high table pointer mov tbhp,a : : tabrd tempreg1 ; transfers value in table referenced by table pointer data at program ; memory address "0F06H" 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 "0F05H" transferred to ; tempreg2 and TBLH in this example the data "1AH" is ; transferred to tempreg1 and data "0FH" to register tempreg2 : : org 0F00h ; sets initial address of program memory |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |