Professional Documents
Culture Documents
04 Ch5
04 Ch5
Embedded Systems
Ch5: AVR and ARM Architectures
Other MCU Architectures
Dr. Mohammed Aldasht
Spring 2022
AVR ARCHITECTURE
• AVR stands for Alf and Vegard's RISC processor
• AVR MCUs are popular MCUs used in project prototyping and embedded
devices.
• AVR is a 8-bit RISC architecture microcontroller in market since 1996
• Having on-chip: Programmable flash memory, SRAM, IO data space & EEPROM.
• AVR is the first MCU in market which has on-chip flash storage.
1
2/22/2022
Block Diagram
According to The
Datasheet
2
2/22/2022
3
2/22/2022
ATMEGA328P
• ATmega328P is a low-power CMOS 8-bit microcontroller based on the AVR enhanced
(RISC) architecture, has the following:
• 32 KBytes of In-System Programmable (ISP) flash to store programs
• 2 KBytes SRAM to hold run-time variables,
• 1 Kbytes EEPROM to store any data that programs may wish to retain after power is cycled,
• 23 general purpose input/output (GPIO) lines,
• 32 general purpose working registers,
• 3 Timer/Counters with compare modes,
• Internal and external interrupts,
• Universal Synchronous/Asynchronous Receiver/-Transmitter (USART),
• 2-wire Serial Interface (TWI) serial port,
• Serial Peripheral Interface (SPI) serial port,
• 6-channel 10-bit Analog/Digital Converter (ADC).
4
2/22/2022
5
2/22/2022
AVR ARCHITECTURE
• Harvard architecture
• Flash – program memory
• 32K
• EEPROM
• For long-term data
• On I/O data bus
MEMORY
6
2/22/2022
AVR CPU
• 32 8-bit GP
registers
• Part of SRAM
memory space
7
2/22/2022
AVR MEMORY
8
2/22/2022
ADDRESSING MODES
ADDRESSING MODES
• Direct I/O
addressing
9
2/22/2022
ADDRESSING MODES
• Direct data
memory
addressing
ADDRESSING MODES
• Direct data
memory with
displacement
addressing
10
2/22/2022
ADDRESSING MODES
• Indirect data
memory
addressing
11
2/22/2022
12
2/22/2022
• Branch/Skip??
13
2/22/2022
ADDRESSING MODES
14
2/22/2022
ADDRESSING MODES
• RJMP, RCALL –
Relative program
memory addressing
APPENDICES A, B AND C
15
2/22/2022
16
2/22/2022
ATMEGA328P PIN
CONFIGURATIONS
ATMEGA328P
ASSEMBLY
INSTRUCTIONS
17
2/22/2022
ATMEGA328P
ASSEMBLY
INSTRUCTIONS
18
2/22/2022
ATMEGA328P
ASSEMBLY
INSTRUCTIONS
ATMEGA328P
ASSEMBLY
INSTRUCTIONS
19
2/22/2022
ATMEGA328P
ASSEMBLY
INSTRUCTIONS
ARM ARCHITECTURE
• ARM (Advanced RISC Machines)
• Arm Ltd. develops the architecture which includes system on a
chip (SoC) design, that incorporate different components such as
memory, and interfaces.
• ARM1 used a 32-bit internal structure, had a 26-bit address
lines (Max main memory size 64 MB).
• ARMv3 up to ARMv7 series, have a 32-bit address space.
• ARMv8-A architecture added support for a 64-bit address space and
64-bit arithmetic with its new 32-bit fixed-length instruction set.
20
2/22/2022
ANY QUESTIONS?
21