Memories.

Slides:



Advertisements
Similar presentations
Microprocessors.
Advertisements

Microprocessor and Microcontroller
TK 2633 Microprocessor & Interfacing
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
Computer System Overview
Rabel Talpur:12BME#025.  40-pin chip  Developed by Motorola in 1975  16 address lines and 8 data lines  Used only +5V.
Atmega32 Architectural Overview
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Execution of an instruction
Microprocessor. Interrupts The processor has 5 interrupts. CALL instruction (3 byte instruction). The processor calls the subroutine, address of which.
Introduction to Microprocessors
Z80 Overview internal architecture and major elements of the Z80 CPU.
Electronic Analog Computer Dr. Amin Danial Asham by.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
ECE 447 Fall 2009 Lecture 4: TI MSP430 Architecture and Instruction Set.
EEPROM Memory 4K bytes of EEPROM exist on the Mega128 EEPROM exists in a separate address space Can only address single bytes using special registers EEPROM.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Modified Harvard architecture 8-bit RISC single chip microcontroller Complete System-on-a-chip On Board Memory (FLASH, SRAM & EEPROM) On Board Peripherals.
80C51 Block Diagram 1. 80C51 Memory Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits – i.e. addresses for only 256.
“Atmega32 Architectural Overview” SIGMA INSTITUTE OF ENGINEERING Prepared By: SR.NO NAME OF STUDENT ENROLLMENT 1 Parihar Shipra A Guided By:-
10- Lock Bits, Fuse Bits and Boot Loader. Boot Loader Support – Read-While-Write Self- Programming: The Boot Loader Support provides a real Read-While-Write.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
CPU Lesson 2.
Unit Microprocessor.
8085 Microprocessor Architecture
INTRODUCTION TO AVRASSEMBLY PROGRAMMING
Basic Computer Organization and Design
COURSE OUTCOMES OF Microprocessor and programming
COMP2121: Microprocessors and Interfacing
Hoda Roodaki BIT ADDRESSABILITY Hoda Roodaki
Format of Assembly language
Atmega32 Architectural Overview
C. K. Pithawalla College of Engineering and Technology, Surat
EEPROM Memory 4K bytes of EEPROM exist on the Mega128
Control Unit Lecture 6.
Gunjeet Kaur Dronacharya Group of institutions
MCI PPT AVR MICROCONTROLLER Mayuri Patel EC-1 5th sem
Introduction to 8086 Microprocessor
CPU Sequencing 6/30/2018.
Interrupts In 8085 and 8086.
AVR Addressing Modes Subject: Microcontoller & Interfacing
Introduction of microprocessor
TAO1221 COMPUTER ARCHITECTURE AND ORGANIZATION LAB 3 & 4 Part 2
Microprocessor and Assembly Language
Dr. Michael Nasief Lecture 2
Microcomputer Programming
The Arduino Microcontroller: Atmel AVR Atmega 328
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
The Processor and Machine Language
Introduction to Microprocessors and Microcontrollers
Instruction cycle Instruction: A command given to the microprocessor to perform an operation Program : A set of instructions given in a sequential.
Lecture 18 Interrupt 동국대학교 홍유표.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Architectural Overview
8085 MICROPROCESSOR 8085 CPU Registers and Status Flags S Z AC P C A B
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
ECE 352 Digital System Fundamentals
Chapter 1 Computer System Overview
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
8051 ASSEMBLY LANGUAGE PROGRAMMING
Computer System Overview
CPU Structure and Function
Register sets The register section/array consists completely of circuitry used to temporarily store data or program codes until they are sent to the.
Computer Architecture Assembly Language
Computer Operation 6/22/2019.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Presentation transcript:

Memories

1. Flash Memory Reprogrammable program Flash memory has the size of 8K x 16 bits (16KByte) by ATmega16. It has an endurance of at least 10,000 write/erase cycles. Program Counter (PC) is 13 bit wide, thus it is capable of addressing the entire Program memory locations. Program Flash memory space is divided in two sections, the Boot program section and the Application program section. ATmega16

Boot Memory Size is programmable thr’ fuses (128-1024 words(16bit)). Boot Memory allows downloading and uploading program code by the μC itself. This feature allows flexible application software updates using a Flash-resident Boot Loader program.

2. SRAM I/O Registers are control Registers for different functions like Communicat- ion functions, I/O Ports,…. ONLY I/O Registers $00 to $31 can be bit addressed: e.g. PORTA.3 means bit 3 of PORT A (see Register Summary in ATmega16 manual)

3. EEPROM 512 byte having an endurance of at least 100,000 write/erase cycles. Write access time ≈ 8.5ms. While read  CPU halted for 4 clock cycles While write  CPU halted for 2 clock cycles

EEPROM I/O Registers Address Register: Data Register: Control Register: Read Enable Write Enable Master Write Enable 1=set EEWE within 4cycles to write 0=no effect for setting EEWE Ready Interrupt-Enable generates an interrupt when EEWE is cleared

C Compiler: CodeVisionAVR Program variables can be global (accessible to all the functions in the program) or local (accessible only inside the function they are declared). If not specifically initialized, the global variables are automatically set to 0 at program startup.

Set EEWE within 4 clock cycles EEPROM WILL BE WRITEN IN Code while(EECR & 0x02) //wait until EEWE=0 #asm ("nop") //delay EEAR=2; //address=2 EEDR=5; //data=5 EECR.2=1; //Write logical one to EEMWE EECR.1=1; //Start eeprom write by setting //EEWE EEWE must be 0 Address Data EEMWE=1 Set EEWE within 4 clock cycles EEPROM WILL BE WRITEN IN Write Sequence Preventing EEPROM corruption: Periods of low VCC can cause this corruption. Remedy: enabling the internal Brown-out Detector (BOD).

Specifying the EEPROM Storage Address for Global Variables To store the integer variable "a“ in EEPROM at address 10h: eeprom int a @0x10;

Status Register Bit 7 – I: Global Interrupt Enable Bit 6 – T: Bit Copy Storage Bit 5 – H: Half Carry Flag Bit 4 – S: Sign Bit, S = N ⊕ V Bit 3 – V: Two’s Complement Overflow Flag Bit 2 – N: Negative Flag Bit 1 – Z: Zero Flag Bit 0 – C: Carry Flag

Program Counter The Program Counter keeps track of the location in flash program memory of the next instruction to be executed. When the uC is reset, the Program Counter resets to 000000. Every instruction fetched causes the Program Counter to increment by the number of bytes of this instruction. Only by program jumps (conditional, unconditional and interrupts) the contents of the Program Counter are changed. Also by interrupts, the Program Counter content is stored on the Stack(?) and a new program location is fetched, and on returning from interrupt the Program Counter regains its value.

Assignment: The Atmega16 is used to control a lift in a 10 floor building. Assume the average speed is 1m/s, and that the lift is moving on the average 6 hours every day, and that the distance between floors is 3m. The EEPROM stores the number of each floor it passes by, so that when the supply is down and back again, the lift will recognize the floor it is at. What other action can be done to let the controller recognize the floor? What is the expected life of the controller? Suggest a way for extending the life of the EEPROM. Homing The lift moves 6x3600 m/day=7200 floor/day=7200write/erase cycles after 100,000/7200≈14 days the EEPROM will not accept data Store location Cycling!