beautypg.com

Avr memories, 1 in-system re-programmable flash program memory, 2 sram data memory – Rainbow Electronics ATtiny861_V User Manual

Page 16

background image

16

2588B–AVR–11/06

ATtiny261/461/861

6.

AVR Memories

This section describes the different memories in the ATtiny261/461/861. The AVR architecture
has two main memory spaces, the Data memory and the Program memory space. In addition,
the ATtiny261/461/861 features an EEPROM Memory for data storage. All three memory
spaces are linear and regular.

6.1

In-System Re-programmable Flash Program Memory

The ATtiny261/461/861 contains 2/4/8K byte On-chip In-System Reprogrammable Flash mem-
ory for program storage. Since all AVR instructions are 16 or 32 bits wide, the Flash is organized
as 1024/2048/4096 x 16.

T h e F la s h m e m o r y h a s a n e n d u r a n c e o f a t l e a s t 1 0 ,0 0 0 w r i t e / e r a s e c y c l e s . T h e
ATtiny261/461/861 Program Counter (PC) is 10/11/12 bits wide, thus addressing the
1024/2048/4096 Program memory locations.

”Memory Programming” on page 168

contains a

detailed description on Flash data serial downloading using the SPI pins.

Constant tables can be allocated within the entire Program memory address space (see the
LPM – Load Program memory instruction description).

Timing diagrams for instruction fetch and execution are presented in

”Instruction Execution Tim-

ing” on page 13

.

Figure 6-1.

Program Memory Map

6.2

SRAM Data Memory

Figure 6-2

shows how the ATtiny261/461/861 SRAM Memory is organized.

The lower 224/352/608 Data memory locations address both the Register File, the I/O memory
and the internal data SRAM. The first 32 locations address the Register File, the next 64 loca-
tions the standard I/O memory, and the last 128/256/512 locations address the internal data
SRAM.

The five different addressing modes for the Data memory cover: Direct, Indirect with Displace-
ment, Indirect, Indirect with Pre-decrement, and Indirect with Post-increment. In the Register
File, registers R26 to R31 feature the indirect addressing pointer registers.

The direct addressing reaches the entire data space.

The Indirect with Displacement mode reaches 63 address locations from the base address given
by the Y- or Z-register.

0x0000

0x03FF/0x07FF/0x0FFF

Program Memory