поискавой системы для электроныых деталей |
|
HT46R002 датащи(PDF) 15 Page - Holtek Semiconductor Inc |
|
HT46R002 датащи(HTML) 15 Page - Holtek Semiconductor Inc |
15 / 83 page Rev. 1.21 14 April 11, 2017 Rev. 1.21 15 April 11, 2017 HT46R002/HT46R003 Cost-Effective A/D 8-Bit OTP MCU HT46R002/HT46R003 Cost-Effective A/D 8-Bit OTP MCU Table Program Example Theaccompanyingexampleshowshowthetablepointerandtabledataisdefinedandretrievedfrom thedevice.Thisexampleusesrawtabledatalocatedinthelastpagewhichisstoredthereusingthe ORGstatement.ThevalueatthisORGstatementis“0300H”whichreferstothestartaddressofthe lastpagewithinthe1KProgramMemoryofthemicrocontroller. Thetablepointerissetheretohaveaninitialvalueof“06H”.Thiswillensurethatthefirstdataread fromthedatatablewillbeattheProgramMemoryaddress“0306H”or6locationsafterthestartof thelastpage.Notethatthevalueforthetablepointerisreferencedtothefirstaddressofthepresent pageifthe“TABRDC[m]”instructionisbeingused.Thehighbyteofthetabledatawhichinthis caseisequaltozerowillbetransferredtotheTBLHregisterautomaticallywhenthe“TABRDL[m]” instructionisexecuted. BecausetheTBLHregisterisaread-onlyregisterandcannotberestored,careshouldbetaken toensureitsprotectionifboththemainroutineandInterruptServiceRoutineusethetableread instructions.Ifusingthetablereadinstructions,theInterruptServiceRoutinesmaychangethe valueofTBLHandsubsequentlycauseerrorsifusedagainbythemainroutine.Asaruleitis recommendedthatsimultaneoususeofthetablereadinstructionsshouldbeavoided.However,in situationswheresimultaneoususecannotbeavoided,theinterruptsshouldbedisabledpriortothe executionofanymainroutinetable-readinstructions.Notethatalltablerelatedinstructionsrequire twoinstructioncyclestocompletetheiroperation. Instruction Table Location Bits b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 TABRDC [m] @9 @8 @7 @6 @5 @4 @3 @2 @1 @0 TABRDL [m] 1 1 @7 @6 @5 @4 @3 @2 @1 @0 Table Location Note:PC9~PC8:CurrentprogramCounterbits @7~@0:TablePointerTBLPbits Table Read Program Example tempreg1 db ? ; temporary register #1 tempreg2 db ? ; temporary register #2 : : mov a,06h ; initialize table pointer - note that this address is referenced mov tblp, a ; to the last page or present page : : tabrdl tempreg1 ; transfers value in table referenced by table pointer ; to tempreg1 ; data at prog. memory address “0306H” transferred to ; 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 “0305H” transferred to ; tempreg2 and TBLH ; in this example the data “1AH” is transferred to tempreg1 and ; data “0FH” to register tempreg2 the value “00H” will be ; transferred to the high byte register TBLH : : org 0300h ; sets initial address of last page dc 00Ah, 00Bh, 00Ch, 00Dh, 00Eh, 00Fh, 01Ah, 01Bh : : |
Аналогичный номер детали - HT46R002 |
|
Аналогичное описание - HT46R002 |
|
|
ссылки URL |
Конфиденциальность |
ALLDATASHEETRU.COM |
Вашему бизинису помогли Аллдатащит? [ 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 |