ATTINY5-MAH Atmel, ATTINY5-MAH Datasheet - Page 114

IC MCU AVR 512B FLASH 8UDFN

ATTINY5-MAH

Manufacturer Part Number
ATTINY5-MAH
Description
IC MCU AVR 512B FLASH 8UDFN
Manufacturer
Atmel
Series
AVR® ATtinyr
Datasheets

Specifications of ATTINY5-MAH

Core Processor
AVR
Core Size
8-Bit
Speed
12MHz
Peripherals
POR, PWM, WDT
Number Of I /o
4
Program Memory Size
512B (256 x 16)
Program Memory Type
FLASH
Ram Size
32 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 4x8b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
8-UFDFN Exposed Pad
Core
AVR8
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Connectivity
-
Lead Free Status / Rohs Status
 Details
15.4.3.2
15.4.3.3
15.4.3.4
15.4.3.5
114
ATtiny4/5/9/10
Erasing the Code Section
Writing a Code Word
Erasing the Configuration Section
Writing a Configuration Word
Before starting the Chip erase, the NVMCMD register must be loaded with the CHIP_ERASE
command. To start the erase operation a dummy byte must be written into the high byte of a
word location that resides inside the Flash code section. The NVMBSY bit remains set until eras-
ing has been completed. While the Flash is being erased neither Flash buffer loading nor Flash
reading can be performed.
The Chip Erase can be carried out as follows:
The algorithm for erasing all pages of the Flash code section is as follows:
The algorithm for writing a word to the code section is as follows:
The algorithm for erasing the Configuration section is as follows:
The algorithm for writing a Configuration word is as follows.
1. Write the CHIP_ERASE command to the NVMCMD register
2. Start the erase operation by writing a dummy byte to the high byte of any word location
3. Wait until the NVMBSY bit has been cleared
1. Write the SECTION_ERASE command to the NVMCMD register
2. Start the erase operation by writing a dummy byte to the high byte of any word location
3. Wait until the NVMBSY bit has been cleared
1. Write the WORD_WRITE command to the NVMCMD register
2. Write the low byte of the data into the low byte of a word location
3. Write the high byte of the data into the high byte of the same word location. This will
4. Wait until the NVMBSY bit has been cleared
1. Write the SECTION_ERASE command to the NVMCMD register
2. Start the erase operation by writing a dummy byte to the high byte of any word location
3. Wait until the NVMBSY bit has been cleared
1. Write the WORD_WRITE command to the NVMCMD register
2. Write the low byte of the data to the low byte of a configuration word location
3. Write the high byte of the data to the high byte of the same configuration word location.
4. Wait until the NVMBSY bit has been cleared
inside the code section
inside the code section
start the Flash write operation
inside the configuration section
This will start the Flash write operation.
8127D–AVR–02/10

Related parts for ATTINY5-MAH