General-purpose register file, Alu – arithmetic logic unit, Downloadable flash program memory – Rainbow Electronics ATtiny28L User Manual
Page 7: Program and data addressing modes, Attiny28l/v
7
ATtiny28L/V
1062E–10/01
r a t e i n t e r r u p t v e c t o r i n t h e i n t e r r u p t v e c t o r t a b l e a t t h e b e g i n n i n g o f t h e
program memory. The different interrupts have priority in accordance with their interrupt
vector position. The lower the interrupt vector address, the higher the priority.
General-purpose
Register File
Figure 6 shows the structure of the 32 general-purpose registers in the CPU.
Figure 6. AVR
CPU General-purpose Working Registers
All the register operating instructions in the instruction set have direct and single cycle
access to all registers. The only exception are the five constant arithmetic and logic
instructions SBCI, SUBI, CPI, ANDI and ORI between a constant and a register and the
LDI instruction for load immediate constant data. These instructions apply to the second
half of the registers in the register file – R16..R31. The general SBC, SUB, CP, AND,
OR and all other operations between two registers or on a single register apply to the
entire register file.
Registers 30 and 31 form a 16-bit pointer (the Z-pointer), which is used for indirect Flash
memory and register file access. When the register file is accessed, the contents of R31
are discarded by the CPU.
ALU – Arithmetic Logic
Unit
The high-performance AVR ALU operates in direct connection with all the 32 general-
purpose working registers. Within a single clock cycle, ALU operations between regis-
ters in the register file are executed. The ALU operations are divided into three main
categories – arithmetic, logic and bit functions. Some microcontrollers in the AVR prod-
uct family feature a hardware multiplier in the arithmetic part of the ALU.
Downloadable Flash
Program Memory
The ATtiny28 contains 2K bytes of on-chip Flash memory for program storage. Since all
instructions are single 16-bit words, the Flash is organized as 1K x 16 words. The Flash
memory has an endurance of at least 1,000 write/erase cycles.
The ATtiny28 program counter is 10 bits wide, thus addressing the 1K word Flash pro-
gram memory. See page 44 for a detailed description of Flash data downloading.
Program and Data
Addressing Modes
The ATtiny28 AVR RISC microcontroller supports powerful and efficient addressing
modes. This section describes the different addressing modes supported in the
ATtiny28. In the figures, OP means the operation code part of the instruction word. To
simplify, not all figures show the exact location of the addressing bits.
7
0
R0
R1
R2
General
…
Purpose
…
Working
R28
Registers
R29
R30 (Z-Register low byte)
R31(Z-Register high byte)