ATMEGA323-8AI Atmel, ATMEGA323-8AI Datasheet - Page 179
![IC AVR MCU 32K 8MHZ IND 44TQFP](/photos/6/70/67042/313-44-tqfp_sml.jpg)
ATMEGA323-8AI
Manufacturer Part Number
ATMEGA323-8AI
Description
IC AVR MCU 32K 8MHZ IND 44TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet
1.ATMEGA323L-4PC.pdf
(247 pages)
Specifications of ATMEGA323-8AI
Core Processor
AVR
Core Size
8-Bit
Speed
8MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
32
Program Memory Size
32KB (16K x 16)
Program Memory Type
FLASH
Eeprom Size
1K x 8
Ram Size
2K x 8
Voltage - Supply (vcc/vdd)
4.5 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
44-TQFP, 44-VQFP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
ATMEGA3238AI
- Current page: 179 of 247
- Download datasheet (4Mb)
Entering the Boot Loader
Program
Capabilities of the Boot
Loader
Self-programming the
Flash
Performing Page Erase by
SPM
Fill the Temporary Buffer
(Page Load)
1457G–AVR–09/03
The SPM instruction can access the entire Flash, but can only be executed from the
Boot Loader Flash section. If no Boot Loader capability is needed, the entire Flash is
available for application code. Entering the Boot Loader takes place by a jump or call
from the application program. This may be initiated by some trigger such as a command
received via USART or SPI interface, for example. Alternatively, the Boot Reset Fuse
can be programmed so that the Reset Vector is pointing to the Boot Flash start address
after a reset. In this case, the Boot Loader is started after a reset. After the application
code is loaded, the program can start executing the application code. Note that the
fuses cannot be changed by the MCU itself. This means that once the Boot Reset Fuse
is programmed, the Reset Vector will always point to the Boot Loader Reset and the
fuse can only be changed through the Serial or Parallel Programming interface.
Table 60. Boot Reset Fuse
The program code within the Boot Loader section has the capability to read from and
write into the entire Flash, including the Boot Loader Memory. This allows the user to
update both the Application code and the Boot Loader code that handles the software
update. The Boot Loader can thus even modify itself, and it can also erase itself from
the code if the feature is not needed anymore.
Programming of the Flash is executed one page at a time. The Flash page must be
erased first for correct programming. The general Write Lock (Lock bit 2) does not con-
trol the programming of the Flash memory by SPM instruction. Similarly, the general
Read/Write Lock (Lock bit 1) does not control reading nor writing by LPM/SPM, if it is
attempted.
The Program memory can only be updated page by page, not word by word. One page
is 128 bytes (64 words). The Program memory will be modified by first performing page
erase, then filling the temporary page buffer one word at a time using SPM, and
then executing page write. If only part of the page needs to be changed, the other parts
must be stored (for example in internal SRAM) before the erase, and then be rewritten.
The temporary page buffer can be accessed in a random sequence. It is essential that
the page address used in both the page erase and page write operation is addressing
the same page. See “Assembly code example for a Boot Loader” on page 185 for an
assembly code example.
To execute Page Erase, set up the address in the Z-pointer, write “00011” to the five
LSB in SPMCR and execute SPM within four clock cycles after writing SPMCR. The
data in R1 and R0 is ignored. The page address must be written to Z14:Z7. Other bits in
the Z-pointer will be ignored during this operation. It is recommended that the interrupts
are disabled during the Page Erase operation.
To write an instruction word, set up the address in the Z-pointer and data in R1:R0, write
“00001” to the five LSB in SPMCR and execute SPM within four clock cycles after writ-
ing SPMCR. The content of Z6:Z1 is used to address the data in the temporary buffer.
Z14:Z7 must point to the page that is supposed to be written.
BOOTRST
0
1
Reset Address
Reset Vector = Application Reset (address $0000)
Reset Vector = Boot Loader Reset (see Table 59)
ATmega323(L)
179
Related parts for ATMEGA323-8AI
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ATmega32](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
![ATMEGA32-8AU](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
ATMEL Corporation
Datasheet:
![ATMEGA32-16MU](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
IC AVR MCU 32K 16MHZ 5V 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16PU](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 32K 16MHZ 5V 40DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16AU](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 32K 16MHZ 5V 44TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16PI](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 32K 16MHZ IND 40-DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16AI](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 32K 16MHZ IND 44-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16AUR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
MCU AVR 32KB FLASH 16MHZ 44TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16MUR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
MCU AVR 32KB FLASH 16MHZ 44QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16AQ](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
MCU AVR 32K FLASH 16MHZ 44-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16PC](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 32K 16MHZ COM 40-DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16MC](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
IC AVR MCU 32K 16MHZ COM 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA32-16AC](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 32K 16MHZ COM 44-TQFP
Manufacturer:
Atmel
Datasheet: