ImageVerifierCode 换一换
格式:DOCX , 页数:59 ,大小:39.53KB ,
资源ID:22744032      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/22744032.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(外文翻译中英文对照AVR单片机Word文档格式.docx)为本站会员(b****8)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

外文翻译中英文对照AVR单片机Word文档格式.docx

1、address pointers can also be used as an address pointer for look up tables in Flash Programmemory. These added function registers are the 16-bit X-, Y-, and Z-register,described later in this section.The ALU supports arithmetic and logic operations between registers or between a constantand a regist

2、er. Single register operations can also be executed in the ALU. AfterFlashProgramMemoryInstructionRegisterDecoderCounterControl Lines32 x 8GeneralPurposeRegistrersALUStatusand ControlI/O LinesEEPROMData Bus 8-bitDataSRAMDirect AddressingIndirect AddressingInterruptUnitSPIWatchdogTimerAnalogComparato

3、rI/O Module 2I/O Module1I/O Module n9ATmega16(L)2466NAVR10/06an arithmetic operation, the Status Register is updated to reflect information about theresult of the operation.Program flow is provided by conditional and unconditional jump and call instructions,able to directly address the whole address

4、 space. Most AVR instructions have a single16-bit word format. Every program memory address contains a 16- or 32-bit instruction.Program Flash memory space is divided in two sections, the Boot program section andthe Application Program section. Both sections have dedicated Lock bits for write andrea

5、d/write protection. The SPM instruction that writes into the Application Flash memorysection must reside in the Boot Program section.During interrupts and subroutine calls, the return address Program Counter (PC) isstored on the Stack. The Stack is effectively allocated in the general data SRAM, and

6、consequently the Stack size is only limited by the total SRAM size and the usage of theSRAM. All user programs must initialize the SP in the reset routine (before subroutinesor interrupts are executed). The Stack Pointer SP is read/write accessible in the I/Ospace. The data SRAM can easily be access

7、ed through the five different addressingmodes supported in the AVR architecture.The memory spaces in the AVR architecture are all linear and regular memory maps.A flexible interrupt module has its control registers in the I/O space with an additionalglobal interrupt enable bit in the Status Register

8、. All interrupts have a separate interruptvector in the interrupt vector table. The interrupts have priority in accordance with theirinterrupt vector position. The lower the interrupt vector address, the higher the priority.The I/O memory space contains 64 addresses for CPU peripheral functions as C

9、ontrolRegisters, SPI, and other I/O functions. The I/O Memory can be accessed directly, or asthe Data Space locations following those of the Register File, $20 - $5F.ALU Arithmetic LogicThe high-performance AVR ALU operates in direct connection with all the 32 generalpurpose working registers. Withi

10、n a single clock cycle, arithmetic operations betweengeneral purpose registers or between a register and an immediate are executed. TheALU operations are divided into three main categories arithmetic, logical, and bit-functions.Some implementations of the architecture also provide a powerful multipl

11、iersupporting both signed/unsigned multiplication and fractional format. See the “InstructionSet” section for a detailed description.Status Register The Status Register contains information about the result of the most recently executedarithmetic instruction. This information can be used for alterin

12、g program flow in order toperform conditional operations. Note that the Status Register is updated after all ALUoperations, as specified in the Instruction Set Reference. This will in many casesremove the need for using the dedicated compare instructions, resulting in faster andmore compact code.The

13、 Status Register is not automatically stored when entering an interrupt routine andrestored when returning from an interrupt. This must be handled by software.The AVR Status Register SREG is defined as:Bit 7 6 5 4 3 2 1 0I T H S V N Z C SREGRead/Write R/W R/W R/W R/W R/W R/W R/W R/WInitial Value 0 0

14、 0 0 0 0 0 010 ATmega16(L) Bit 7 I: Global Interrupt EnableThe Global Interrupt Enable bit must be set for the interrupts to be enabled. The individualinterrupt enable control is then performed in separate control registers. If the GlobalInterrupt Enable Register is cleared, none of the interrupts a

15、re enabled independent ofthe individual interrupt enable settings. The I-bit is cleared by hardware after an interrupthas occurred, and is set by the RETI instruction to enable subsequent interrupts. The Ibitcan also be set and cleared by the application with the SEI and CLI instructions, asdescribe

16、d in the instruction set reference. Bit 6 T: Bit Copy StorageThe Bit Copy instructions BLD (Bit LoaD) and BST (Bit STore) use the T-bit as source ordestination for the operated bit. A bit from a register in the Register File can be copiedinto T by the BST instruction, and a bit in T can be copied in

17、to a bit in a register in theRegister File by the BLD instruction. Bit 5 H: Half Carry FlagThe Half Carry Flag H indicates a Half Carry in some arithmetic operations. Half Carry isuseful in BCD arithmetic. See the “Instruction Set Description” for detailed information. Bit 4 S: Sign Bit, S = N VThe

18、S-bit is always an exclusive or between the Negative Flag N and the Twos ComplementOverflow Flag V. See the “Instruction Set Description” for detailed information. Bit 3 V: Twos Complement Overflow FlagThe Twos Complement Overflow Flag V supports twos complement arithmetics. Seethe “Instruction Set

19、Description” for detailed information. Bit 2 N: Negative FlagThe Negative Flag N indicates a negative result in an arithmetic or logic operation. See Bit 1 Z: Zero FlagThe Zero Flag Z indicates a zero result in an arithmetic or logic operation. See the“Instruction Set Description” for detailed infor

20、mation. Bit 0 C: Carry FlagThe Carry Flag C indicates a carry in an arithmetic or logic operation. See the “InstructionSet Description” for detailed information.11General PurposeRegister FileThe Register File is optimized for the AVR Enhanced RISC instruction set. In order toachieve the required per

21、formance and flexibility, the following input/output schemes aresupported by the Register File: One 8-bit output operand and one 8-bit result input Two 8-bit output operands and one 8-bit result input Two 8-bit output operands and one 16-bit result input One 16-bit output operand and one 16-bit resu

22、lt inputFigure 4 shows the structure of the 32 general purpose working registers in the CPU.Figure 4. AVR CPU General Purpose Working RegistersMost of the instructions operating on the Register File have direct access to all registers,and most of them are single cycle instructions.As shown in Figure

23、 4, each register is also assigned a data memory address, mappingthem directly into the first 32 locations of the user Data Space. Although not being physicallyimplemented as SRAM locations, this memory organization provides greatflexibility in access of the registers, as the X-, Y-, and Z-pointer R

24、egisters can be set toindex any register in the file.7 0 Addr.R0 $00R1 $01R2 $02R13 $0DGeneral R14 $0EPurpose R15 $0FWorking R16 $10Registers R17 $11R26 $1A X-register Low ByteR27 $1B X-register High ByteR28 $1C Y-register Low ByteR29 $1D Y-register High ByteR30 $1E Z-register Low ByteR31 $1F Z-regi

25、ster High Byte12 ATmega16(L)The X-register, Y-register andZ-registerThe registers R26.R31 have some added functions to their general purpose usage.These registers are 16-bit address pointers for indirect addressing of the Data Space.The three indirect address registers X, Y, and Z are defined as des

26、cribed in Figure 5.Figure 5. The X-, Y-, and Z-registersIn the different addressing modes these address registers have functions as fixed displacement,automatic increment, and automatic decrement (see the Instruction SetReference for details).Stack Pointer The Stack is mainly used for storing temporary data, for storing local variables and forstoring return addresses after interrupts and subroutine calls. The Stack Pointer Registeralways points to the top of the Stack. Note that the Stack is implemented as growingfrom higher memory locations to lower memory locations. This im

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1