atmega323l ATMEL Corporation, atmega323l Datasheet - Page 11

no-image

atmega323l

Manufacturer Part Number
atmega323l
Description
Atmega323 8-bit Avr Microcontroller With 32k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
The General Purpose
Register File
The X-register, Y-register, and
Z-register
1457G–AVR–09/03
Figure 7 shows the structure of the 32 general purpose working registers in the CPU.
Figure 7. AVR CPU General Purpose Working Registers
Most register operating instructions in the instruction set have direct access to all regis-
ters, and most of them are single cycle instructions.
As shown in Figure 7, each register is also assigned a Data memory address, mapping
them directly into the first 32 locations of the user Data Space. Although not being phys-
ically implemented as SRAM locations, this memory organization provides great
flexibility in access of the registers, as the X-, Y-, and Z-registers can be set to index any
register in the file.
The registers R26..R31 have some added functions to their general purpose usage.
These registers are address pointers for indirect addressing of the Data Space. The
three indirect address registers X, Y, and Z are defined as:
Figure 8. The X-, Y-, and Z-registers
In the different addressing modes these address registers have functions as fixed dis-
placement, automatic increment and decrement (see the descriptions for the different
instructions).
X - register
Y - register
Z - register
Registers
Purpose
Working
General
15
70
R27 ($1B)
15
70
R29 ($1D)
15
70
R31 ($1F)
7
XH
YH
ZH
R13
R14
R15
R16
R17
R26
R27
R28
R29
R30
R31
R0
R1
R2
0
0
0
0
XL
7
R26 ($1A)
YL
7
R28 ($1C)
ZL
7
R30 ($1E)
Addr.
$0D
$1C
$1D
$00
$01
$02
$0E
$0F
$10
$11
$1A
$1B
$1E
$1F
ATmega323(L)
X-register High Byte
Y-register High Byte
Z-register High Byte
X-register Low Byte
Y-register Low Byte
Z-register Low Byte
0
0
0
11
0
0
0

Related parts for atmega323l