| поискавой системы для электроныых деталей |
|
HT45FM2C датащи(PDF) 22 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45FM2C датащи(HTML) 22 Page - Holtek Semiconductor Inc |
|
22 / 171 page ![]() Rev. 1.10 �� �a� �0� �01� Rev. 1.10 �� �a� �0� �01� HT45FM2C Brushless DC Motor Flash Type 8-Bit MCU HT45FM2C Brushless DC Motor Flash Type 8-Bit MCU Preliminar� Table Program Example Thefollowingexampleshowshowthetablepointerandtabledataisdefinedandretrievedfromthe microcontroller.ThisexampleusesrawtabledatalocatedintheProgramMemorywhichisstored thereusingtheORGstatement.ThevalueatthisORGstatementis"F00H"whichreferstothestart addressofthelastpagewithinthe4KProgramMemoryofthedevice.Thetablepointerissetup heretohaveaninitialvalueof"06H".Thiswillensurethatthefirstdatareadfromthedatatablewill beattheProgramMemoryaddress"F06H"or6locationsafterthestartofthelastpage.Notethat thevalueforthetablepointerisreferencedtothefirstaddressofthepresentpageifthe"TABRDC [m]"instructionisbeingused.Thehighbyteofthetabledatawhichinthiscaseisequaltozerowill betransferredtotheTBLHregisterautomaticallywhenthe"TABRDC[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 present page mov a, 07h ; initialise high table pointer mov tbhp, a : : tabrdl tempreg1 ; transfers value in table referenced by table pointer ; data at program memory address “F06H” transferred to ; tempreg1 and TBLH dec tblp ; reduce value of table pointer by one tabrdl tempreg2 ; transfers value in table referenced by table pointer ; data at program memory address “F05H” transferred to ; tempreg2 and TBLH in this example the data “1AH” is ; transferred to tempreg1 and data “0FH” to register tempreg2 : : org F00h ; sets initial address of program memory dc 00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh : : |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |