| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
HT66F0187 bảng dữ liệu(PDF) 37 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT66F0187 bảng dữ liệu(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 |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |