| Electronic Components Datasheet Search |
|
HT48R002 Datasheet(PDF) 18 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT48R002 Datasheet(HTML) 18 Page - Holtek Semiconductor Inc |
|
18 / 71 page ![]() Rev. 1.11 18 April 11, 2017 Rev. 1.11 19 April 11, 2017 HT48R002/HT48R003 Cost-Effective I/O 8-Bit OTP MCU HT48R002/HT48R003 Cost-Effective I/O 8-Bit OTP MCU Special Function Registers Toensuresuccessfuloperationofthemicrocontroller,certaininternalregistersareimplementedin theDataMemoryarea.Theseregistersensurecorrectoperationofinternalfunctionssuchastimer, interrupts,etc.,aswellasexternalfunctionssuchasI/Odatacontrol.Thelocationsoftheseregisters withintheDataMemorybeginattheaddressof“00H”.AnyunusedDataMemorylocations betweenthesespecialfunctionregistersandthepointwheretheGeneralPurposeMemorybeginsis reservedandattemptingtoreaddatafromtheselocationswillreturnavalueof“00H”. Indirect Addressing Registers – IAR0, IAR1 TheIndirectAddressingRegisters,IAR0andIAR1,althoughhavingtheirlocationsinnormalRAM register,donotactuallyphysicallyexistasnormalregisters.Themethodofindirectaddressing forRAMdatamanipulationisusingtheseIndirectAddressingRegistersandMemoryPointers,in contrasttodirectmemoryaddressing,wheretheactualmemoryaddressisspecified.Actionson theIAR0andIAR1registerswillresultinnoactualreadorwriteoperationtotheseregistersbut rathertothememorylocationspecifiedbytheircorrespondingMemoryPointers,MP0orMP1.As theIndirectAddressingRegistersarenotphysicallyimplemented,readingtheIndirectAddressing Registersindirectlywillreturnaresultof“00H”andwritingtotheregistersindirectlywillresultin nooperation. Memory Pointers – MP0, MP1 TwoMemoryPointers,knownasMP0andMP1areprovided.TheseMemoryPointersare physicallyimplementedintheDataMemoryandcanbemanipulatedinthesamewayasnormal registersprovidingaconvenientwaywithwhichtoindirectlyaddressandtrackdata.Whenany operationtotherelevantIndirectAddressingRegistersiscarriedout,theactualaddresswhichthe microcontrollerisdirectedtoistheaddressspecifiedbytherelatedMemoryPointer.Notethatfor thisdevice,theMemoryPointers,MP0andMP1,areboth8-bitregistersandusedtoaccesstheData MemorytogetherwiththeircorrespondingindirectaddressingregistersIAR0andIAR1. ThefollowingexampleshowshowtoclearasectionoffourDataMemorylocationsalreadydefined aslocationsadres1toadres4. Indirect Addressing Program Example data . section ‘data’ adres1 db ? adres2 db ? adres3 db ? adres4 db ? block db ? code. section at 0 code org 00h start: mov a,04h ; set size of block mov block,a mov a,offset adres1 ; Accumulator loaded with first RAM address mov mp0,a ; set memory pointer with first RAM address loop: clr IAR0 ; clear the data at address defined by MP0 inc mp0 ; increment memory pointer sdz block ; check if last memory location has been cleared jmp loop continue: Theimportantpointtonotehereisthatintheexampleshownabove,noreferenceismadetospecific DataMemoryaddresses. |
|
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 |