Download presentation
Presentation is loading. Please wait.
Published byJemimah Lloyd Modified over 8 years ago
1
ALPHA COLLEGE OF ENGINEERING & TECHNOLOGY Introduction to AVR ATMega32 Architecture PREPARED BY SHWETA (140513111001) BHOOMI (140513111002) YOGEN (140513111003)
2
20112012-IModule 2/2 Architecture – attributes of a system visible to a programmer – these attributes have a direct impact on the logical execution of a program Instruction set, number of bits used for data representation, I/O mechanisms, addressing techniques – Design issue: whether a computer will have a specific instruction. e.g. Is there a multiply instruction? Processor Architecture & Organization
3
20112012-IModule 2/3 Organization – the operational units and their interconnections that realize the architectural specifications (how features are implemented) – hardware details that are transparent to the programmers – Control signals, interfaces, memory technology – Design issue: how this instruction is to be implemented. Is there a hardware multiply unit or is it done by repeated addition? Split caches or unified cache Processor Architecture & Organization
4
20112012-IModule 2/4 Processor Architecture & Organization Many computer manufacturers offer a family of computer models, all with the same architecture but with differences in organization. This gives code compatibility (at least backwards) – All Intel x86 family share the same basic architecture – The IBM System/370 family share the same basic architecture An architecture may survive many years, but its organization changes with the changing technology. – E.g. the IBM Systems/370 architecture, with few enhancements, has survived to this day as the architecture of IBM's mainframe product line.
5
Introduction to Atmel AVR 20112012-IModule 2/5 Atmel Corporation is a manufacturer of semiconductors, founded in 1984.semiconductors Atmel introduced the first 8-bit flash microcontroller in 1993, based on the 8051 core. In 1996, a design office was started in Trondheim, Norway, to work on the AVR series of products. Its products include microcontrollers (including 8051 derivatives and AT91SAM and AT91CAP ARM-based micros), and its own Atmel AVR and AVR32 architectures.8051 AT91SAMAT91CAPARMAtmel AVRAVR32
6
AVR different groups Classic AVR – e.g. AT90S2313, AT90S4433 Mega – e.g. ATmega8, ATmega32, ATmega128 Tiny – e.g. ATtiny13, ATtiny25 Special Purpose AVR – e.g. AT90PWM216,AT90USB1287
7
ATMega32 Pin out & Descriptions 20112012-IModule 2/7 Case 1 : To make a pin go high or low ( if it is an output pin)- Data Register PORTx
8
ATMega32 Pin out & Descriptions 20112012-IModule 2/8 Pull-up resistors are used in electronic logic circuits to ensure that inputs to logic systems settle at expected logic levels if external devices are disconnected or high-impedanceresistorslogic circuitshigh-impedance
9
ATMega32 Pin out & Descriptions 20112012-IModule 2/9 Case 2 : To activate / Deactivate pull up resistors-Data Register PORTx
10
ATMega32 Pin out & Descriptions 20112012-IModule 2/10 The PINx register gets the reading from the input pins of the MCU
11
AVR Architecture 20112012-IModule 2/11
12
ATMega32 Architecture 20112012-IModule 2/12 Native data size is 8 bits (1 byte). Uses 16-bit data addressing allowing it to address 2 16 = 65536 unique addresses. Has three separate on-chip memories 2KB SRAM 8 bits wide used to store data 1KB EEPROM 8 bits wide used for persistent data storage 32KB Flash 16 bits wide used to store program code I/O ports A-D Digital input/output Analog input Serial/Parallel Pulse accumulator
13
ATMega32 Programmer Model: Memory 20112012-IModule 2/13 1.2KB SRAM – For temporary data storage – Memory is lost when power is shut off (volatile) – Fast read and write 2.1KB EEPROM – For persistent data storage – Memory contents are retained when power is off (non-volatile) – Fast read; slow write – Can write individual bytes 3.32KB Flash Program Memory – Used to store program code – Memory contents retained when power is off (non-volatile) – Fast to read; slow to write – Can only write entire “blocks” of memory at a time – organized in 16-bit words (16KWords)
14
ATMega32 Programmer Model: Memory 20112012-IModule 2/14 TypeFlashRAMEEPROM F_ENDSize, kBRAMENDSize, kBE_ENDSize, kB Atmega8$0FFF8$045F1$1FF0.5 Atmega32$3FFF32$085F2$3FF1 Atmega64$7FFF64$10FF4$7FF2 Atmega128$FFFF128$10FF4$FFF4 AVR microcontrollers are Harvard architecture. This means, that in this architecture are separate memory types (program memory and data memory) connected with distinct buses. Such memory architecture allows processor to access program memory and data memory at the same time. This increases performance of MCU comparing to CISC architecture, where CPU uses same bus for accessing program memory and data memory. Each memory type has its own address space:
15
ATMega32 Programmer Model: Program Memory 20112012-IModule 2/15 Flash Memory Layout
16
ATMega32 Programmer Model: Data Memory 20112012-IModule 2/16 ATmega32 contains 1024 bytes of data EEPROM memory. It is organized as a separate data space, in which single bytes can be read and written. The EEPROM has an endurance of at least 100,000 write/erase cycles. Different chip have different size of EEPROM memory ChipBytesChipBytesChipBytes ATmega8512ATmega16512ATmega321024 ATmega642048ATmega1284096ATmega256RZ4096 ATmega6404096ATmega12804096ATmega25604096 EEPROM
17
ATMega32 Programmer Model: Data Memory 20112012-IModule 2/17 GPRs (general purpose registers), Special Function Registers (SFRs), and Internal data SRAM. The data memory is composed of three parts:
18
ATMega32 Programmer Model: Internal SRAM 20112012-IModule 2/18 Internal data SRAM is widely used for storing data and parameters by AVR programmers and C compilers. Each location of the SRAM can be accessed directly by its address. Each location is 8 bit wide and can be used to store any data we want. Size of SRAM is vary from chip to chip, even among members of the same family.
19
ATMega32 Programmer Model: Registers 20112012-IModule 2/19
20
ATMega32 Programmer Model: Registers (GPRs) 20112012-IModule 2/20 The fast-access Register file contains 32 x 8-bit general purpose working registers with a single clock cycle access time. This allows single-cycle Arithmetic Logic Unit (ALU) operation. In a typical ALU operation, two operands are output from the Register file, the operation is executed, and the result is stored back in the Register file –in one clock cycle.”
21
ATMega32 Programmer Model: Registers (GPRs) 20112012-IModule 2/21 “Six of the 32 registers can be used as three 16-bit indirect address register pointers for Data Space addressing –enabling efficient address calculations. One of the these address pointers can also be used as an address pointer for look up tables in Flash Program memory. These added function registers are the 16-bit X-register, Y- register and Z-register, described later.”
22
ATMega32 Programmer Model: Registers (GPRs) 20112012-IModule 2/22 The R26..R31 registers have some added functions to their general purpose usage. These registers are 16-bit address pointers for indirect addressing of the Data Space. The three indirect address registers X, Y, and Z are shown above. In the different addressing modes these address registers have functions as fixed displacement, automatic increment, and automatic decrement
23
THANK YOU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.