atmel公司24系列eeprom编程举例

atmel公司24系列eeprom编程举例

ID:23306224

大小:47.00 KB

页数:21页

时间:2018-11-06

atmel公司24系列eeprom编程举例_第1页
atmel公司24系列eeprom编程举例_第2页
atmel公司24系列eeprom编程举例_第3页
atmel公司24系列eeprom编程举例_第4页
atmel公司24系列eeprom编程举例_第5页
资源描述:

《atmel公司24系列eeprom编程举例》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、ATMEL公司24系列EEPROM编程举例作者:尘封往事文章来源:本站原创点击数:2043更新时间:2006-1-1213:07:34NAME Control_AT24Cxx;ThiscollectionofroutinesallowsanAT89C2051microcontrollertoread;andwritetheAT24CxxfamilyofserialCMOSEEPROMS.Thisversionofthe;codeiscompatibleonlywiththeAT89C2051duetothelocationofthe;databufferandstacki

2、nRAM.Thecodemaybemodifiedtoworkwiththe;AT89C1051byrelocatingorresizingthebufferandstacktofitintothe;smalleramountofRAMavailableintheAT89C1051.Notethattheminimum;sizeofthebufferisdeterminedbythepagesizeoftheAT24Cxx.;;AllfiveAT24Cxxdeviceoperationsaresupported.ByteWrite,Current;AddressReada

3、ndRandomReadareimplementedbythefunctionsWRITE_BYTE,;READ_CURRENTandREAD_RANDOM,respectively.PageWriteandSequentialRead;arespecialcasesoffunctionsWRITE_BLOCKandREAD_BLOCK,respectively.;WRITE_BLOCKandREAD_BLOCKprocessfromonebytetothenumberofbytes;inapageandtransferdatabetweentheAT24Cxxandth

4、eRAMbuffer.;;ThecodesupportsmultipleAT24Cxxdevicesperbus,eachwithaunique;addressdeterminedbythewiringoftheaddresspins(A0,A1,A2).The;three-bitprogrammableaddressispassedtotheWRITE_BYTE,READ_CURRENT,;READ_RANDOM,WRITE_BLOCKandREAD_BLOCKfunctions,whereitiscombined;withtheAT24Cxxfixedaddress(

5、FADDR)andusedtoaddressadeviceonthe;bus.RefertotheAT24Cxxfamilydatasheetsforadditionalinformationon;deviceaddressing.;;FunctionsBYTE_FILL,VERIFY_BYTE_FILL,PAGE_FILLandVERIFY_PAGE_FILLare;artifactsfromthedebugprocessandservetoillustratetheuseofthe;devicereadandwritefunctionswithanAT24C64.To

6、modifythecodefora;differentmemberoftheAT24Cxxfamily,simplyredefinethevaluesofSIZE;(thenumberofbytesperdevice)andPSIZE(thenumberofbytesperpage).;Tochangethefillvalue,redefineFILL.Tochangetheprogrammableportion;ofthedeviceaddress,redefinePADDRtoavaluefromzerotoseven.;;ThecodemeetsallAT24Cxx

7、familytimingrequirementswhenexecutedbyan;AT89Cx051microcontrollerwitha12MHzclock.Codemodificationsmaybe;requiredifafasterclockissubstituted.FADDR  EQU 0a0h  ;fixedaddressforAT24CxxEEPROMsPADDR  EQU 0  ;programmableaddress(0..7)SIZE  EQU 2000h  ;bytesperAT24C64PSIZE 

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。