| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
HT66F3197 bảng dữ liệu(PDF) 41 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT66F3197 bảng dữ liệu(HTML) 41 Page - Holtek Semiconductor Inc |
|
41 / 210 page ![]() Rev. 1.10 40 November 24, 2016 Rev. 1.10 41 November 24, 2016 HT66F3197 Enhanced A/D MCU with EEPROM and UART HT66F3197 Enhanced A/D MCU with EEPROM and UART Programming Considerations CaremustbetakenthatdataisnotinadvertentlywrittentotheEEPROM.Protectioncanbe enhancedbyensuringthattheWriteEnablebitisnormallyclearedtozerowhennotwriting.Alsothe MemoryPointerhighbyteregistercouldbenormallyclearedtozeroasthiswouldinhibitaccessto Sector1wheretheEEPROMcontrolregisterexist.Althoughcertainlynotnecessary,consideration mightbegivenintheapplicationprogramtothecheckingofthevalidityofnewwritedatabya simplereadbackprocess.WhenwritingdatatheWRbitmustbesethighimmediatelyafterthe WRENbithasbeensethigh,toensurethewritecycleexecutescorrectly.Theglobalinterruptbit EMIshouldalsobeclearedbeforeawritecycleisexecutedandthenre-enabledafterthewritecycle starts.NotethatthedeviceshouldnotentertheIDLEorSLEEPmodeuntiltheEEPROMreador writeoperationistotallycompleted.Otherwise,theEEPROMreadorwriteoperationwillfail. Programming Examples • Reading data from the EEPROM – polling method MOVA,EEPROM_ADRES ;userdefinedaddress MOVEEA,A MOVA,040H ;setupmemorypointerlowbyteMP1L MOVMP1L,A ;MP1LpointstoEECregister MOVA,01H;setupMemoryPointerhighbyteMP1H MOVMP1H,A SETIAR1.1;setRDENbit,enablereadoperations SETIAR1.0 ;startReadCycle-setRDbit BACK: SZIAR1.0;checkforreadcycleend JMPBACK CLRIAR1;disableEEPROMread/write CLRMP1H 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 ;setupmemorypointerlowbyteMP1L MOVMP1L,A ;MP1LpointstoEECregister MOVA,01H;setupMemoryPointerhighbyteMP1H MOVMP1H,A CLREMI SETIAR1.3;setWRENbit,enablewriteoperations SETIAR1.2;startWriteCycle-setWRbit–executedimmediately ;aftersetWRENbit SETEMI BACK: SZIAR1.2;checkforwritecycleend JMPBACK CLRIAR1;disableEEPROMread/write CLRMP1H |
|
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 |