ATtiny2313 General Registers

Publisher:Harmonious88Latest update time:2020-07-02 Source: eefocusKeywords:ATtiny2313 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The register file is optimized for the AVR Enhanced RISC instruction set. To achieve the required performance and flexibility, the register file supports the following input/output schemes:
Output one 8-bit operand, input one 8-bit result
Output two 8-bit operands, input one 8-bit result
Output two 8-bit operands, input one 16-bit result
Output one 16-bit operand, input one 16-bit result


Figure 4 shows the structure of the CPU's 32 general working registers.

ATtiny2313 General Register Structure
(Click on the image to enlarge)


Figure 4. AVR CPU General Working Registers


Most instructions that operate on the register file have direct access to all registers, and most such instructions execute in a single clock cycle.


As shown in Figure 4, each register has a data memory address, which maps them directly to the first 32 addresses of the user data space. Although the physical implementation of the register file is not SRAM, this memory organization has great flexibility in accessing registers because the X, Y, and Z registers can be set as pointers to any register.

In addition to being used as general-purpose registers, registers R26..R31 can also be used as address pointers for data indirect addressing. These three indirect addressing registers are shown in Figure 5.

ATtiny2313 X, Y, Z Registers

Figure 5. X, Y, Z registers.
In different addressing modes, these address registers can implement fixed offset, automatic increment and decrement functions.
For details, please refer to the ATtiny2313 instruction set.

Note: In all the above pictures, the "$" in the address is changed to "0X".

Keywords:ATtiny2313 Reference address:ATtiny2313 General Registers

Previous article:ATtiny2313 Stack Pointer
Next article:ATtiny2313 Status Register

Recommended ReadingLatest update time:2024-11-16 17:47

AVR MCU RTOS-AVRX Application
introduction       With the development of technology, the design and application of embedded systems have a great impact on people's lives and will gradually change people's future lifestyles. Developing applications on a specific operating system allows developers to ignore many underlying hardware details, maki
[Microcontroller]
Homemade AVR MCU Unlocker
A rectangular wave generator can be made by using the 2MHz passive quartz crystal of the AVR microcontroller and the 6-phase inverter 74HC04, plus a few 1/4W color ring resistors. The following figure shows the pin distribution of 74HC04. As shown in the figure above and below, the 14th pin of 74HC04 is t
[Analog Electronics]
Homemade AVR MCU Unlocker
AVR MCU JTAG Debugging Quick Start
The following debugging method is from AVR Studio 4. I have tried to translate it for accurate understanding. Please correct me if there are any inaccuracies: Auto Step It can execute instructions repeatedly. If the current mode is source (i.e. C language window display mode), one instruction will be exe
[Microcontroller]
AVR MCU JTAG Debugging Quick Start
Toshiba LB1847 stepper motor driver chip pdf data and AVR microcontroller source code
ATMEGA16A uses Toshiba LB1847 chip to drive stepper motor Toshiba LB1847 pin diagram:   LB1847 Typical Application Circuit Diagram     ton : Output ON time toff : Output OFF time tm : FAST DECAY time in MIX DECAY mode tn : Noise cancelling time MIX DECAY logic setting DECAY pin : L MD pin : 1.5V to
[Microcontroller]
Toshiba LB1847 stepper motor driver chip pdf data and AVR microcontroller source code
AVR fuse settings
The configuration of AVR fuse bits is a relatively delicate task. Users often overlook its importance or find it difficult to master. The following are some key points and related matters that need to be noted when configuring AVR fuse bits. For the specific definition and function of ATmega128 fuse bits, please refer
[Microcontroller]
Remote water monitoring system based on AVR and wireless technology
    In order to improve the management level of water resources in China, better monitor the safe operation of water conservancy projects, maximize the rational use of water resources, improve the utilization rate of water resources, and give full play to the benefits of projects, the construction of this monitoring au
[Microcontroller]
Remote water monitoring system based on AVR and wireless technology
AVR BOOTLOADER Technology Detailed Explanation
ATmega128 has the user program self-programming function supported by boot loading (In-System Programming by On-chip Boot Program), which provides a real system program self-programming update mechanism for the MCU itself to automatically download and update (using the "Read-While-Write" method) the program co
[Microcontroller]
Tunnel Environment Monitoring System Based on AVR32
1. Project Overview 1.1 Introduction The environment in the tunnel will bring some special problems to driving safety and the health of passengers and maintenance workers, mainly because of the temperature, humidity, light, and the content and accumulation of harmful gases in the tunnel. Therefore, understanding t
[Microcontroller]
Tunnel Environment Monitoring System Based on AVR32
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号