| Electronic Components Datasheet Search |
|
HT45FM2C Datasheet(PDF) 33 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45FM2C Datasheet(HTML) 33 Page - Holtek Semiconductor Inc |
|
33 / 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� Writing Data to the EEPROM TowritedatatotheEEPROM,thewriteenablebit,WREN,intheEECregistermustfirstbeset hightoenablethewritefunction.TheEEPROMaddressofthedatatobewrittenmustthenbe placedintheEEAregisterandthedataplacedintheEEDregister.IftheWRbitintheEECregister isnowsethigh,aninternalwritecyclewillthenbeinitiated.SettingtheWRbithighwillnotinitiate awritecycleiftheWRENbithasnotbeenset.AstheEEPROMwritecycleiscontrolledusingan internaltimerwhoseoperationisasynchronoustomicrocontrollersystemclock,acertaintimewill elapsebeforethedatawillhavebeenwrittenintotheEEPROM.Detectingwhenthewritecycle hasfinishedcanbeimplementedeitherbypollingtheWRbitintheEECregisterorbyusingthe EEPROMinterrupt.Whenthewritecycleterminates,theWRbitwillbeautomaticallyclearedto zerobythemicrocontroller,informingtheuserthatthedatahasbeenwrittentotheEEPROM.The applicationprogramcanthereforepolltheWRbittodeterminewhenthewritecyclehasended. Write Protection Protectionagainstinadvertentwriteoperationisprovidedinseveralways.Afterthedeviceis powered-ontheWriteEnablebitinthecontrolregisterwillbeclearedpreventinganywrite operations.Alsoatpower-ontheBankPointer,BP,willberesettozero,whichmeansthatData MemoryBank0willbeselected.AstheEEPROMcontrolregisterislocatedinBank1,thisaddsa furthermeasureofprotectionagainstspuriouswriteoperations.Duringnormalprogramoperation, ensuringthattheWriteEnablebitinthecontrolregisterisclearedwillsafeguardagainstincorrect writeoperations. EEPROM Interrupt TheEEPROMwriteorreadinterruptisgeneratedwhenanEEPROMwriteorreadcyclehasended. TheEEPROMinterruptmustfirstbeenabledbysettingtheEPWEbitintherelevantinterrupt register.HoweverastheEEPROMiscontainedwithinaMulti-functionInterrupt,theassociated multi-functioninterruptenablebitmustalsobeset.WhenanEEPROMwritecycleends,the EPWFrequestflaganditsassociatedmulti-functioninterruptrequestflagwillbothbeset.Ifthe global,EEPROMandMulti-functioninterruptsareenabledandthestackisnotfull,ajumpto theassociatedMulti-functionInterruptvectorwilltakeplace.Whentheinterruptisservicedonly theMulti-functioninterruptflagwillbeautomaticallyreset,theEEPROMinterruptflagmustbe manuallyresetbytheapplicationprogram.MoredetailscanbeobtainedintheInterruptsection. Programming Consideration CaremustbetakenthatdataisnotinadvertentlywrittentotheEEPROM.Protectioncanbe enhancedbyensuringthattheWriteEnablebitisnormallyclearedtozerowhennotwriting.Also theBankPointercouldbenormallyclearedtozeroasthiswouldinhibitaccesstoBank1where theEEPROMcontrolregisterexist.Althoughcertainlynotnecessary,considerationmightbegiven intheapplicationprogramtothecheckingofthevalidityofnewwritedatabyasimplereadback process. |
|
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 |