Embedded Systems _ Lec 1_Introduction-1.pdf
Document Details
Uploaded by RenewedParrot
Full Transcript
EMBEDDED SYSTEMS AND INTERFACE INTRODUCTION Dr. Khalil Ismail Khalil Yousef Assoc. Prof., Electrical Eng. Dept. Faculty of Eng., Assiut University [email protected] EMBEDDED SYSTEMS WHAT IS AN EMBEDDED SYSTEM? Display A...
EMBEDDED SYSTEMS AND INTERFACE INTRODUCTION Dr. Khalil Ismail Khalil Yousef Assoc. Prof., Electrical Eng. Dept. Faculty of Eng., Assiut University [email protected] EMBEDDED SYSTEMS WHAT IS AN EMBEDDED SYSTEM? Display A/D Converter Information Sample & Hold Processing D/A Converter (Physical) Sensors Environment Actuators EXAMPLE: IRRIGATION CONTROL SYSTEM WHAT IS EMBEDDED SYSTEM? An embedded system is a computer system with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. EMBEDDED SYSTEM REQUIREMENTS Embedded systems have minimal requirements for memory, program size, and need to communicate with simple I/Os. Keyboards, screens, disks, printers are rarely needed by an embedded system, but simple keypads and LCD displays are mandatory. Microcontrollers are usually dedicated to one task and run one specific program. A TYPICAL EMBEDDED SYSTEM 1. Microcontroller (MCU) 2. Memory 3. Display Unit 4. Input devices 5. Sensors 6. …etc The most important item (sub-block) of the embedded system is its MCU as it handles the whole data and executes the instructions set. MICROCONTROLLER (MCU) HISTORY 1971 : Texas Instrument calculator-on-a-chip TMS 1000, which was a 4-bit microcontroller with built-in ROM and RAM. 1976 : Intel 8048 was one of Intel's first microcontrollers. 1980 : Intel 8051 followed in and became one of the most popular microcontroller families. 1996 : ATmel AVR was one of the first microcontroller families to use on-chip flash memory for program storage. ADVANTAGES OF EMBEDDED SYSTEMS 1. Cheap. 2. Very small in size. 3. Programming of Microcontrollers is simple to learn. 4. Ability to simulate project before implementation. HARDWARE MAJOR MARKET 1. Texas Instruments 2. Microchip 3. ATmel Corporation 4. Renesas Electronics Corporation 5. Intel Corporation 6. STMicroelectronics 7. Freescale Semiconductor COURSE OBJECTIVES By the end of this course, you should be familiar with the microcontrollers and embedded systems basic architectures, features, and programming. The main objectives of this course are: learning and understanding basics of: 1. Embedded systems 2. Microcontrollers’architectures 3. Programming of microcontrollers 4. Designing simple embedded systems 5. Linking various concepts of electronics and circuits within the embedded systems framework. COURSE CONTENTS 1. Getting Started with Embedded Systems - µP vs. µC 2. Embedded Systems and the ATMega16 (AVR- Atmel) 3. Starting to Program – Introduction to C and Programming 4. Parallel Ports, General I/O Ports and the Clock Oscillator 5. Memories Mapping 6. Utilization of Interrupts, Counters, and Timers 7. Data Acquisition and Manipulation (A/D Converters) 8. Serial Data (Communication Modules) 9. Sensors and Actuators 10. Projects TEXTBOOK AND REFERENCES Text book 1. Tim Wilmshurst, Designing Embedded Systems with PIC Microcontrollers: Principles and Applications, Newnes, 2007. 2. Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi. AVR microcontroller and embedded systems: using assembly and C. Prentice Hall Press, 2010. References 1. Tim Wilmshurst, An Introduction to the Design of Small- Scale Embedded Systems, Palgrave, 2001. 2. Muhammad Ali Mazidi, Rolin D. McKinlay, and Danny Causey. PIC microcontroller and embedded systems: using Assembly and C for PIC18, 2008. EMBEDDED OVERVIEW Definition of Embedded Systems Examples Computer Essentials Microprocessors and Microcontrollers EMBEDDED SYSTEMS Embedded system is a system that has a built-in computer that helps the system performing a specific task. A computerized system that is embedded into an piece of equipment or a machine to control it. (Embedded Computer) Examples: In most electric/electronic equipment: Refrigerator, Modern cars, Washing machines, …etc. MODERN LIFE EMBEDDED SYSTEMS You may be surprised to know that these unexpected systems also contain Embedded Systems (ESs). EMBEDDED SYSTEMS FOR SAFETY Today’s vehicles are complex and employ smart mechanisms that contain many different embedded systems that are designed to help drivers control a car and ensure road safety. In LEXUS LS-460 (released in Sep., 2006), there are more than 100 ECUs embedded when all optional equipment are installed. In remote sites, safety is an important issue to assure, embedded systems would represent the most convenient solution for production side safety monitoring. ELECTRONICS VS. EMBEDDED SYSTEMS The basic advantage of using Microcontrollers upon the Electronics (Hardware only) is that the first one makes the functionality of the program determined by the Software. Usually with high speed and low cost. # Hardware Software Design Cost High Medium Speed High Medium Modifications Hard Easy Maintainability Hard Easy Time to market Long short Cost High Low COMPUTERS VS. EMBEDDED SYSTEMS Computer (PC or laptop) is a computer that can r un a very wide range of applications. ✓ End User can control running applications. Embedded System is a computer that can run for only specific tasks. ✓ End User (usually) has no control on what is running. COMPUTERS VS. EMBEDDED SYSTEMS Applications Application(s) Operating System Operating System Firmware Firmware Application Firmware Hardware Hardware Hardware Computer Complex Embedded Simple Embedded (PC or laptop) Computer Computer EMBEDDED SYSTEMS HARDWARE Microcontroller which contain: Processor, Timers, Interrupt controller, I/O Devices, Memories, Ports, … etc. All on single chip or System On Chip (SOC). ADDED FEATURES OF ΜC OVER ΜP Microcontroller which contain: Processor, Timers, Interrupt controller, I/O Devices, Memories, Ports, … etc. All on single chip or System On Chip (SOC). ΜC VS. ΜP # Micro-controller Micro-processor Cost Cheap Expensive Speed Slow (in MHz Range) Fast (in GHz Range) Purpose Special General Dependency Single Chip has almost all Need external components to be components able to interact Resources Limited Unlimited Access Time to Memory Low High Power Consumption Low Very High MICROCONTROLLER FAMILIES 68H12: Motorola 68H11, 68HC12, … 8051: Intel 8051, 8052, 80251,… PIC: Microchip PIC16F628, 18F452, 16F877, … AVR: Atmel ATmega128, ATtiny28L, AT90S8515,… CISC VS. RISC Complex Instruction Set Computer (CISC) CISC VS. RISC Complex Instruction Set Computer (CISC) CISC VS. RISC Reduced Instruction Set Computer (RISC) CISC VS. RISC Reduced Instruction Set Computer (RISC) CISC VS. RISC RISC vs. CISC Comparison INTRODUCTION TO ATMEL AVR ATmel Corporation is a manufacturer of semiconductors, founded in 1984. ATmel introduced the first 8-bit flash microcontroller in 1993, based on the 8051 core. In 1996, a design office was started in Norway to work on the AVR series of products. INTRODUCTION TO ATMEL AVR AVR might stand for: Advanced Virtual RISC processor, or Alf and Vegard RISC processor. The basic architecture of AVR was designed by two students Alf- Egil Bogen and Vegard Wollan, and then was bought and developed by Atmel in 1996. The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. FAMILIAR WITH THE AVR PART NUMBERS ATmega128 ATmel Mega Group Flash = 128 K ATtiny44 AT90S8515 ATmel Tiny Group Flash = 4 K ATmel Classic Group Flash = 8 K ATMEGA128 SPECIFICATIONS 64 pin device. 53 Programmable I/O Lines. Advanced RISC Architecture. 128 Kbytes of Flash Program memory. 4 Kbytes EEPROM + 4 Kbytes Internal SRAM. 32 x 8 General Purpose Working Registers. Two 8-bit,Two 16-bit Timer/Counters. External and Internal Vectored Interrupt Sources. ATMEGA16 SPECIFICATIONS 40 pin device. 32 Programmable I/O Lines. Advanced RISC Architecture. 16 Kbytes of Flash Program memory. 512 bytes EEPROM 32 x 8 General Purpose Working Registers. Two 8-bit, One 16-bit Timer/Counters. External and Internal Vectored Interrupt Sources. ATMEGA16 BLOCK DIAGRAM DESIGN LIFE CYCLE FOR EMBEDDED SYSTEMS PROGRAMMING LANGUAGES/METHODS ASSEMBLY VS. C LANGUAGES Assembly C One instruction = one One instruction = many machine code instruction. machine code instructions. Machine specific, machine- Portable, task-oriented. Deals oriented. Deals with Registers with variables. and Memory-locations. Less easy to write and debug. More English-like. An instruction deals with at An instruction can have many most 2 operands. operands. ARDUINO Arduino is an open-source platform based on flexible, easy-to-use hardware and software. It’s intended for hobbyists. But it is NOT a good standard to benefit from the power of embedded electronics. Good practice for writing a program is to create modular pieces of code, and not writing everything in one long file ‘spaghetti code’, with definitions of variables everywhere and nowhere. The Arduino is great ‘programming fastfood': easily available, quick result and sometimes quite tasty. But it isn’t suitable for educating ‘how to program’or ‘getting performance out of microcontrollers’. C is a lot faster and a lot more memory economic than arduino. Thanks Questions and Feedback