| Electronic Components Datasheet Search |
|
HT66F0187 Datasheet(PDF) 37 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT66F0187 Datasheet(HTML) 37 Page - Holtek Semiconductor Inc |
|
37 / 192 page ![]() Rev. 1.20 36 ����st 2�� 201� Rev. 1.20 3� ����st 2�� 201� HT66F0187 A/D Flash MCU with EEPROM HT66F0187 A/D Flash MCU with EEPROM Reading Data from the EEPROM ToreaddatafromtheEEPROM,thereadenablebit,RDEN,intheEECregistermustfirstbeset hightoenablethereadfunction.TheEEPROMaddressofthedatatobereadmustthenbeplaced intheEEAregister.IftheRDbitintheEECregisterisnowsethigh,areadcyclewillbeinitiated. SettingtheRDbithighwillnotinitiateareadoperationiftheRDENbithasnotbeenset.When thereadcycleterminates,theRDbitwillbeautomaticallyclearedtozero,afterwhichthedatacan bereadfromtheEEDregister.ThedatawillremainintheEEDregisteruntilanotherreadorwrite operationisexecuted.TheapplicationprogramcanpolltheRDbittodeterminewhenthedatais validforreading. Writing Data to the EEPROM TowritedatatotheEEPROM,theEEPROMaddressofthedatatobewrittenmustfirstbeplaced intheEEAregisterandthedataplacedintheEEDregister.Thenthewriteenablebit,WREN, intheEECregistermustfirstbesethightoenablethewritefunction.Afterthis,theWRbitin theEECregistermustbeimmediatelysethightoinitiateawritecycle.Thesetwoinstructions mustbeexecutedconsecutively.TheglobalinterruptbitEMIshouldalsofirstbeclearedbefore implementinganywriteoperations,andthensetagainafterthewritecyclehasstarted.Notethat settingtheWRbithighwillnotinitiateawritecycleiftheWRENbithasnotbeenset.Asthe EEPROMwritecycleiscontrolledusinganinternaltimerwhoseoperationisasynchronousto microcontrollersystemclock,acertaintimewillelapsebeforethedatawillhavebeenwritteninto theEEPROM.Detectingwhenthewritecyclehasfinishedcanbeimplementedeitherbypollingthe WRbitintheEECregisterorbyusingtheEEPROMinterrupt.Whenthewritecycleterminates, theWRbitwillbeautomaticallyclearedtozerobythemicrocontroller,informingtheuserthatthe datahasbeenwrittentotheEEPROM.TheapplicationprogramcanthereforepolltheWRbitto determinewhenthewritecyclehasended. Write Protection Protectionagainstinadvertentwriteoperationisprovidedinseveralways.Afterthedeviceis poweredon,theWriteEnablebitinthecontrolregisterwillbeclearedpreventinganywrite operations.Alsoatpower-ontheMemoryPointerhighbyteregisters,MP1HandMP2H,willbe resettozero,whichmeansthatDataMemorySector0willbeselected.AstheEEPROMcontrol registerislocatedinSector1,thisaddsafurthermeasureofprotectionagainstspuriouswrite operations.Duringnormalprogramoperation,ensuringthattheWriteEnablebitinthecontrol registerisclearedwillsafeguardagainstincorrectwriteoperations. EEPROM Interrupt TheEEPROMwriteinterruptisgeneratedwhenanEEPROMwritecyclehasended.TheEEPROM interruptmustfirstbeenabledbysettingtheDEEbitintherelevantinterruptregister.However,as theEEPROMiscontainedwithinaMulti-functionInterrupt,theassociatedmulti-functioninterrupt enablebitmustalsobeset.WhenanEEPROMwritecycleends,theDEFrequestflagandits associatedmulti-functioninterruptrequestflagwillbothbeset.Iftheglobal,EEPROMandMulti- functioninterruptsareenabledandthestackisnotfull,ajumptotheassociatedMulti-function Interruptvectorwilltakeplace.WhentheinterruptisservicedonlytheMulti-functioninterruptflag willbeautomaticallyreset,theEEPROMinterruptflagmustbemanuallyresetbytheapplication program. |
|
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 |