There are two types of memory:
Read/Write
Read Only Memory (ROM)
The ATMEGA32 uses SRAM for data and FLASH memory for the program
This is know as the Harvard Architecture which is used by many modern processors
This means that your program will still be there the next time you turn your board on, it will run your program (but all data will be lost)
The Harvard architecture is safer because it prevents the program from overwriting itself and then executing the data
Allows storage of 1's and 0's
The data is stored in groups of 8 bits per location
Memory is organized as an array
Each location has a unique address
The ATMEGA32 has 2KiB (2048 bytes)
We could represent each unique address with 11 bits, but the ATMEGA32 uses 16 bit address
0x60 is the first available address of SRAM
0x85F is the the last available address of SRAM
Also stores 1's and 0's
The data is stored in groups of 16 bits per location
Memory is organized as an array
Each location has a unique address
The ATMEGA32 has 32KiB (32768 bytes)
Often 32KiB is referred to as 32KB, but as of
November 2000, the correct prefixes for binary multiples are kibibytes (KiB), mebibytes (MiB), gibibytes (GiB), etc.
Since each location is 16 bits, we have 214 = 16384 locations
We would need 14 bits to represent each unique address
ATMEGA32 has 32 registers
The registers are each 8 bits wide
They are located at r0 through r31
The registers are located in SRAM at addresses 0x00 through 0x1F