Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ATtiny2313A ATtiny4313.pdf
Скачиваний:
40
Добавлен:
11.05.2015
Размер:
6.13 Mб
Скачать

5. Memories

The AVR architecture makes a distinction between program memory and data memory, locating each memory type in a separate address space. Executable code is located in non-volatile program memory (Flash), whereas data can be placed in either volatile (SRAM) or non-volatile memory (EEPROM). See Figure 5-1, below.

Figure 5-1. Memory Overview.

DATA MEMORY

PROGRAM MEMORY

EXTENDED

I/O REGISTER FILE

DATA MEMORY

I/O REGISTER FILE

GENERAL PURPOSE

REGISTER FILE

FLASH

SRAM

EEPROM

All memory spaces are linear and regular.

5.1Program Memory (Flash)

ATtiny2313A/4313 contains 2/4K byte of on-chip, in-system reprogrammable Flash memory for program storage. Flash memories are non-volatile, i.e. they retain stored information even when not powered.

Since all AVR instructions are 16 or 32 bits wide, the Flash is organized as 1024/2048 x 16 bits. The Program Counter (PC) is 10/11 bits wide, thus capable of addressing all 1024/2048 locations of program memory, as illustrated in Table 5-1, below.

Table 5-1.

Size of Program Memory (Flash).

 

 

Device

 

Flash Size

 

Address Range

 

 

 

 

 

ATtiny2313A

 

2KB

 

1024 words

0x0000 – 0x03FF

 

 

 

 

 

 

ATtiny4313

 

4KB

 

2048 words

0x0000 – 0x07FF

 

 

 

 

 

 

Constant tables can be allocated within the entire address space of program memory. See instructions LPM (Load Program Memory), and SPM (Store Program Memory) in “Instruction Set Summary” on page 257. Flash program memory can also be programmed from an external device, as described in “External Programming” on page 184.

Timing diagrams for instruction fetch and execution are presented in “Instruction Execution Timing” on page 12.

The Flash memory has a minimum endurance of 10,000 write/erase cycles.

16 ATtiny2313A/4313

8246B–AVR–09/11

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]