欢迎来到天天文库
浏览记录
ID:12334965
大小:1.57 MB
页数:44页
时间:2018-07-16
《avr教程 avr architecture》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、ArchitectureCoreandPeripheralsAtmelMCUTraining-ASIA2004December2004TheAVRCOREHarvardarchitectureSeparatememoriesandbusesforprogramanddata32x8-bitgeneralpurposeworkingregistersLargeAccumulatorSingleclockcycleaccesstime3registerpairactas16-bitdatapointersSingle-cycleArith
2、meticLogicUnit(ALU)operation16-bitStackPointer22-bitProgramCounter2XPointerYPointerZPointerR0R1R2R26R27R28R29R30R31XHXLYLYHZLZH32x8-bitGeneralPurposeRegisters328-bitAccumulatorRegistersAllhavedirectaccesstoALU3registerpairactas16-bitdatapointersInstructionsetsupportfora
3、utoincrement,decrementanddisplacementofpointersEnablingefficientaddresscalculations.ZPointersuitedforlookuptablesandindirectjumpDirectaddressofupto64K3SingleCycleInstructionExecutionRegisterFileALURegisteroperationstakeONEclockpulseontheEXTERNALclockinput4MemoryOverview
4、andInterconnectionGeneralpurposeregistersmanagealldatatransferDirectProgrammemoryaccessDirectSRAMaccessEEPROMaccessviaIOregistersEEAR,EEDR,EECRSecureProgrammemoryandEEPROMaccessTimedsequenceProgramMemoryRegisterFileI/ORegistersEEPROMSRAM5ProgramMemoryandDataPointersStac
5、kPointer+ThreeDatapointersOneortwopointers+SPiscommonfor8-bitPointerreloadingisminimizedCodeefficientmemorytomemorycopySeparatestacksforreturnaddressesandlocalvariablesPointerhandlingsimilartoC-languageAutoIncrement/DecrementIndirectwithDisplacementEfficientforaccessing
6、arraysandstructsEfficientwhenplacinglocalvariablesonSoftwareStackCSourcecodeunsignedchar*var1,*var2;*var1++=*--var2;AssemblycodeLDR16,-XSTZ+,R166AVR-DesignedforCProgrammingArchitectureandinstructionsetco-designedwithIARSystemsCompilerdevelopmentprojectinitiatedbeforearc
7、hitectureandinstructionsetfrozenCompilerexperts’adviceimplementedinhardwarePotentialHLLbottlenecksidentifiedandremovedThedesignprocessresultedinInstructionsetsupportfor16-bitarithmeticoperations32workingregisterswhicheliminatemovetoandfromSRAMSingleCycleexecution7ASmall
8、CFunction/*Returnthemaximumvalueofatableof16integers*/intmax(int*array){chara;intmaximum=-32768;for(a=0;a<16;a
此文档下载收益归作者所有