AVR Microcontroller: Introduction & Components - PDF

Document Details

SensationalOliveTree102

Uploaded by SensationalOliveTree102

Okan Üniversitesi

Dr. Shirin Saleh Ahari

Tags

AVR microcontroller embedded systems CPU computer engineering

Summary

This document is a presentation on AVR microcontrollers, covering their architecture, components and operation. It includes discussions on microprocessors, memory types like RAM and ROM, and fundamental data types. Key topics such as CPU components, memory access, and the history of microcontrollers are explored.

Full Transcript

AVR Microcontroller Embedded System Designing Dr. Shirin Saleh Ahari Department of Electrical and computer Engineering Grading Mid-term exam: 30% Final exam: 40% laboratory: 30% References Muhammad Ali Mazidi, Sarmad Naimi, Sepehr Nai...

AVR Microcontroller Embedded System Designing Dr. Shirin Saleh Ahari Department of Electrical and computer Engineering Grading Mid-term exam: 30% Final exam: 40% laboratory: 30% References Muhammad Ali Mazidi, Sarmad Naimi, Sepehr Naimi, “the AVR microcontroller and embedded system: using assembly and C” SYLLABUS OF MICROCONTROLLER COURSE  Introduction; application based introduction of microprocessors and microcontrollers, microcontroller vs microprocessor  The AVR microcontroller: history and features  AVR microcontroller Architecture.  C Review.  AVR programming and applications( mega 32/16) “According to the course flow”.  I/O Ports.  LCD  Timers/Counters  keypads  Analog to digital converter “A/D”.  Motor control with PWM Introduction A microcontroller is a single chip, self contained computer. Introduction Microprocessor vs. Microcontroller: the main difference is related to their operation and their Peripherals RAM ROM Serial & Micro- I/O Port Parallel Ports Processor Timer Interrupt Introduction Microprocessor vs. Microcontroller Introduction  Microprocessor:  only processing of data  Faster  General purpose  Expensive  CPU is stand-alone, RAM, ROM, I/O, timer are separate.  Designer can control the amount of ROM, RAM and I/O ports.  It is cheaper compared to the microcontroller with the same features. Introduction  Microcontroller:  Slower.  Stand alone operation.  Cheaper.  CPU, RAM, ROM, I/O and timer are all on a single chip(but fixed amount).  Is used for applications in which cost, power and space are critical.  Single Operation. history AVR family AVR family First AVR family AT90S series: These are the classic members of the AVR family and have fewer features than the next three, and less Word is used. ATtiny series: These microcontrollers are small in size 8 to 32 base and have better capabilities than the first category and are mostly used in systems that do not require a high port.it is 8 bit. ATmega Series: This category has more features than the previous two categories. These types of microcontrollers are self-programmable and can be programmed using additional circuits. It is 8 bit. It has 4–256 KB program memory. ATMEGA8, ATMEGA48, ATMEGA16, ATMEGA32,… Atxmega series: these category is the largest and the advanced one and has 16–384 KB program memory. It is 16 bit Fundamental Data Types microcontroller components  CPU  Memories  Input/output ports  Timer/counter  Parallel ports  Interrupt sources  PWM function  (A/D , D/A) converters microcontroller components  CPU: central proceeding unit  CPU is the brain of a microcontroller. CPU is responsible for fetching the instruction, decodes it, then finally executed. CPU connects every part of a microcontroller into a single system. The primary function of CPU is fetching and decoding instructions. The instruction fetched from program memory must be decoded by the CPU.  Flech  Decode  Execute  CPU components 1. Register 2. ALU: arithmetic logic unit (ALU) is a combinational digital circuit that performs arithmetic and bitwise operation 3. CU : control unit decodes the instructions, and controls all the other internal components of the CPU to make it work. An auxiliary register 1. Register: is a quickly accessible location available to a processor and is one of a small set of data holding places that may hold an instruction, a storage address, or any kind of data  Accumulator register: the accumulator is a register in which intermediate arithmetic and logic results are stored  Flag register: it is the status register, the value of these bits indicates some conditions that result after the execution of an instruction o Ex: ZF flag (zero falg): if the result of instruction will be zero then ZF=1 o Ex: sign flag (negative –positive statues):if the sign of the instruction will be negative then SF=1  Program counter or instruction pointer register: indicates where a CPU is in its program sequence and contains the address of the next instruction meaning that along executing the program a unity added to the line of number of the next instruction  Memory types:  There are several types of memory which is divided into RAM (random access memory) which is Volatile memory, and ROM (read-only memory)and Flash memory which are Non-Volatile  RAM  ROM  Flash memory  Memory types:  RAM(Random Access Memory): static and dynamic RAM ○ SRAM(Static RAM):  Very expensive  Very high performance  Constructed of Flip-Flops  RAM(Random Access Memory): ○ DRAM(Dynamic RAM):  Cheap  Constructed from Capacitors so it needs to be refreshed periodically.  It is divided into:  SDRAM(Synchronous DRAM) - SDR-SDRAM(Single Data Rate) - DDR-SDRAM(Double Data Rate) DDR-SDRAM has better performance and faster than the SDR- SDRAM and it is commonly used now in our computer  ROM(Read Only Memory): ROM(ROM) PROM(Programmable ROM). EPROM (Erasable PROM by UV light). EEPROM(Electrically Erasable PROM).  Flash Memory: ○ It is non-volatile computer memory that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards and USB flash drives for general storage and transfer of data between computers and other digital products. It is a specific type of EEPROM (Electrically Erasable Programmable Read-Only Memory) that is erased and programmed in large blocks (it is faster than EEPROM)  I/O: Input/output ports  Parallel input/output ports are mainly used to drive/interface various devices such as LCD’S, LED’S, printers, memories, etc to a microcontroller