| Electronic Components Datasheet Search |
|
HT66F302 Datasheet(PDF) 32 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT66F302 Datasheet(HTML) 32 Page - Holtek Semiconductor Inc |
|
32 / 129 page ![]() Rev. 1.11 32 April 11, 2017 Rev. 1.11 33 April 11, 2017 HT66F302/HT66F303 Cost-Effective Flash MCU with EEPROM HT66F302/HT66F303 Cost-Effective Flash MCU with EEPROM Programming Considerations CaremustbetakenthatdataisnotinadvertentlywrittentotheEEPROM.ProtectioncanbePeriodic byensuringthattheWriteEnablebitisnormallyclearedtozerowhennotwriting.AlsotheBank PointercouldbenormallyclearedtozeroasthiswouldinhibitaccesstoBank1wheretheEEPROM controlregisterexist.Althoughcertainlynotnecessary,considerationmightbegiveninthe applicationprogramtothecheckingofthevalidityofnewwritedatabyasimplereadbackprocess. WhenwritingdatatheWRbitmustbesethighimmediatelyaftertheWRENbithasbeensethigh, toensurethewritecycleexecutescorrectly.TheglobalinterruptbitEMIshouldalsobecleared beforeawritecycleisexecutedandthenre-enabledafterthewritecyclestarts.Notethatthedevice shouldnotentertheIDLEorSLEEPmodeuntiltheEEPROMreadorwriteoperationistotally complete.Otherwise,theEEPROMreadorwriteoperationwillfail. Programming Examples Reading data from the EEPROM – polling method MOVA,EEPROM_ADRES ;userdefinedaddress MOVEEA,A MOVA,040H;setupmemorypointerMP1 MOVMP1,A;MP1pointstoEECregister MOVA,01H ;setupBankPointer MOVBP,A SETIAR1.1;setRDENbit,enablereadoperations SETIAR1.0 ;startReadCycle-setRDbit BACK: SZIAR1.0;checkforreadcycleend JMPBACK CLRIAR1;disableEEPROMwrite CLRBP MOVA,EED;movereaddatatoregister MOVREAD_DATA,A Writing Data to the EEPROM – polling method MOVA,EEPROM_ADRES ;userdefinedaddress MOVEEA,A MOVA,EEPROM_DATA ;userdefineddata MOVEED,A MOVA,040H;setupmemorypointerMP1 MOVMP1,A;MP1pointstoEECregister MOVA,01H ;setupBankPointer MOVBP,A CLREMI SETIAR1.3;setWRENbit,enablewriteoperations SETIAR1.2;startWriteCycle-setWRbit–executedimmediatelyafter ;setWRENbit SETEMI BACK: SZIAR1.2;checkforwritecycleend JMPBACK CLRIAR1;disableEEPROMwrite CLRBP |
|
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 |