| Electronic Components Datasheet Search |
|
HT45F4630 Datasheet(PDF) 34 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45F4630 Datasheet(HTML) 34 Page - Holtek Semiconductor Inc |
|
34 / 153 page ![]() Rev. 1.00 34 ���i� 1�� �01� Rev. 1.00 35 ���i� 1�� �01� HT45F4630 DC Motor Driver ASSP MCU HT45F4630 DC Motor Driver ASSP MCU Reading Data from the EEPROM ToreaddatafromtheEEPROM,thereadenablebit,RDEN,intheEECregistermustfirstbeset hightoenablethereadfunction.TheEEPROMaddressofthedatatobereadmustthenbeplaced intheEEA1/EEA0register.IftheRDbitintheEECregisterisnowsethigh,areadcyclewillbe initiated.SettingtheRDbithighwillnotinitiateareadoperationiftheRDENbithasnotbeenset. Whenthereadcycleterminates,theRDbitwillbeautomaticallyclearedtozero,afterwhichthe datacanbereadfromtheEEDregister.ThedatawillremainintheEEDregisteruntilanotherread orwriteoperationisexecuted.TheapplicationprogramcanpolltheRDbittodeterminewhenthe dataisvalidforreading. Writing Data to the EEPROM TowritedatatotheEEPROM,theEEPROMaddressofthedatatobewrittenmustfirstbeplaced intheEEA1/EEA0registerandthedataplacedintheEEDregister.Thenthewriteenablebit, WREN,intheEECregistermustfirstbesethightoenablethewritefunction.Afterthis,theWR bitintheEECregistermustbeimmediatelysethightoinitiateawritecycle.Thesetwoinstructions mustbeexecutedconsecutively.TheglobalinterruptbitEMIshouldalsofirstbeclearedbefore implementinganywriteoperations,andthensetagainafterthewritecyclehasstarted.Notethat settingtheWRbithighwillnotinitiateawritecycleiftheWRENbithasnotbeenset.Asthe EEPROMwritecycleiscontrolledusinganinternaltimerwhoseoperationisasynchronousto microcontrollersystemclock,acertaintimewillelapsebeforethedatawillhavebeenwritteninto theEEPROM.Detectingwhenthewritecyclehasfinishedcanbeimplementedeitherbypollingthe WRbitintheEECregisterorbyusingtheEEPROMinterrupt.Whenthewritecycleterminates, theWRbitwillbeautomaticallyclearedtozerobythemicrocontroller,informingtheuserthatthe datahasbeenwrittentotheEEPROM.TheapplicationprogramcanthereforepolltheWRbitto determinewhenthewritecyclehasended. Write Protection Protectionagainstinadvertentwriteoperationisprovidedinseveralways.Afterthedeviceis powered-ontheWriteEnablebitinthecontrolregisterwillbeclearedpreventinganywrite operations.Alsoatpower-ontheBankPointer,BP,willberesettozero,whichmeansthatData MemoryBank0willbeselected.AstheEEPROMcontrolregisterislocatedinBank1,thisaddsa furthermeasureofprotectionagainstspuriouswriteoperations.Duringnormalprogramoperation, ensuringthattheWriteEnablebitinthecontrolregisterisclearedwillsafeguardagainstincorrect writeoperations. EEPROM Interrupt TheEEPROMwriteinterruptisgeneratedwhenanEEPROMwritecyclehasended.TheEEPROM interruptmustfirstbeenabledbysettingtheEPWEbitintherelevantinterruptregister.Whenan EEPROMwritecycleends,theEPWFrequestflagwillbeset.IftheEEPROMinterruptisenabled andthestackisnotfull,ajumptotheassociatedEEPROMInterruptvectorwilltakeplace.When theinterruptisserviced,theEEPROMinterruptrequestflag,EPWF,willbeautomaticallyresetand theEMIbitwillbeautomaticallyclearedtodisableotherinterrupts.Moredetailscanbeobtainedin theInterruptsection. |
|
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 |