Embedded system

23,441 views

Published on

Published in: Education, Technology, Business
30 Comments
93 Likes
Statistics
Notes
No Downloads
Views
Total views
23,441
On SlideShare
0
From Embeds
0
Number of Embeds
116
Actions
Shares
0
Downloads
1
Comments
30
Likes
93
Embeds 0
No embeds

No notes for slide

Embedded system

  1. 1. Microcontrollers & Embedded Processors Anshul Parmar Nazim Ali Rohit Gambhir Acharya Narendra Dev College University of Delhi
  2. 2. <ul><li>What is an Embedded System? </li></ul><ul><li>Characteristics of Embedded Systems </li></ul><ul><li>General Types Of Embedded Systems </li></ul><ul><li>Where are Embedded Systems used? </li></ul><ul><li>Typical Embedded Systems Hardware </li></ul><ul><li>New trends in ES hardware </li></ul><ul><li>Microcontrollers </li></ul><ul><li>Microcontroller Architecture </li></ul><ul><li>The 8051 Microcontroller </li></ul><ul><li>Programming Techniques </li></ul><ul><li>Downfalls of embedded systems </li></ul><ul><li>References </li></ul>Embedded System
  3. 3. <ul><li>An embedded system can be defined as one that has computer hardware with software embedded in it as one of its most important components. </li></ul><ul><li>An embedded system is a combination of computer hardware and software, either fixed in capability or programmable, that is specifically designed for a particular kind of application device. </li></ul><ul><li>Embedded systems that are programmable are provided with a programming interface. </li></ul>Embedded System
  4. 4. EMBEDDED SYSTEMS <ul><li>Executes a single program with few parameters </li></ul><ul><li>Task –specific : Can be optimized for a specific application </li></ul><ul><li>Interacts with environment in many ways </li></ul><ul><ul><li>Direct sensing and control of signal wires </li></ul></ul><ul><ul><li>Communication protocols to environment and other devices </li></ul></ul><ul><ul><li>Real-time interactions and constraints </li></ul></ul><ul><ul><li>Power –saving modes of operation to conserve battery </li></ul></ul>Embedded System
  5. 5. <ul><li>Real-Time Operation </li></ul><ul><li>• Reactive: computations must occur in response to external events. </li></ul><ul><li>Correctness is partially a function of time </li></ul><ul><li>Small Size, Low Weight </li></ul><ul><li>• Hand-held electronics and Transportation applications </li></ul><ul><li>Low Power </li></ul><ul><li>Battery power for 8+ hours </li></ul><ul><li>Harsh environment </li></ul><ul><li>Heat, vibration,shock , p ower fluctuations, RF interference, </li></ul><ul><li>lightni ng, corrosion </li></ul><ul><li>Extremely cost sensitive </li></ul>Embedded System
  6. 6. <ul><li>Hardware Restraints </li></ul><ul><li>The term embedded system does not refer to devices that are isolated but rather, they are a part of the device they control or perform some other task in. </li></ul><ul><li>The  software  that is used in embedded systems is usually termed as firmware . </li></ul>Embedded System
  7. 7. <ul><li>A simple embedded system usually consists of components such as buttons and LED to input the data and to show the output respectively. </li></ul><ul><li>Complex embedded systems have touch screens, large amount of buttons etc. for the purposes of input, output etc. </li></ul><ul><li>An embedded system has software designed to keep in view three constraints :- </li></ul><ul><li>Available system memory </li></ul><ul><li>Available processing speed </li></ul><ul><li>Need to limit power dissipation </li></ul>Embedded System
  8. 8. <ul><li>Microprocessors </li></ul><ul><li>Microcontrollers. </li></ul><ul><li>Microprocessors usually perform a single or very limited set of tasks. In many cases, a single microprocessor may not be of any use at all. Microcontrollers on the other hand can perform a number of operations and thus, can execute a complete task. They can be considered as extended versions of a microprocessor. </li></ul>Embedded System
  9. 9. <ul><li>General Computing </li></ul><ul><li>Control Systems </li></ul><ul><li>Signal Processing </li></ul><ul><li>Communication & Networking </li></ul>Embedded System
  10. 10. <ul><ul><li>Real-time video, DVD players, Medical equipment. </li></ul></ul><ul><ul><li>Network routers, switches, firewalls, mass transit systems, Elevator </li></ul></ul><ul><ul><li>Mobile phones, pagers, home appliances, toys, smartcards, MP3 players, PDAs, digital cameras, sensors, pc keyboard & mouse </li></ul></ul><ul><ul><li>Brake system </li></ul></ul><ul><ul><li>Engine control unit </li></ul></ul><ul><ul><li>Diagnostics and Security systems </li></ul></ul><ul><ul><li>Accessories (doors, windows etc) </li></ul></ul>continued Embedded System
  11. 11. Embedded System <ul><li>PRINTERS AND COPIERS </li></ul><ul><li>FACTORY CORDINATION </li></ul><ul><li>PERSONAL GADGETRY </li></ul><ul><li>HOME APPLIANCES </li></ul><ul><li>TOY INDUSTRY </li></ul><ul><li>AUTOMOTIVE </li></ul><ul><li>AIRCRAFTS </li></ul><ul><li>ROBOTICS </li></ul>
  12. 12. Examples Office systems and mobile equipment Building systems Manufacturing and Process Control Answering machines Copiers Faxes Laptops and notebooks Mobile Telephones PDAs, Personal organisers Still and video cameras Telephone systems Time recording systems Printer Microwave Air conditioning Backup lighting and generators Building management systems CTV systems Fire Control systems Heating and ventilating systems Lifts, elevators, escalators Lighting systems Security systems Security cameras Sprinkler systems Automated factories Bottling plants Energy control systems Manufacturing plants Nuclear power stations Oil refineries and related storage facilities Power grid systems Power stations Robots Switching systems Water and sewage systems
  13. 13. EPROMS IN SOCKETS 2K bytes RAM DISCRETE LOGIC FOR “GLUE” FUNCTIONS <ul><li>8-BIT MICROPROCESSOR ( Z80 ) </li></ul><ul><li>SOCKETED </li></ul><ul><li>40 PINS @ 0.100” SPACING </li></ul><ul><li>DUAL IN-LINE PACKAGE ( DIP) </li></ul><ul><li>4 MHz CLOCK SPEED </li></ul>CRYSTAL OSCILLATOR Embedded System
  14. 14. <ul><li>Commercial off-the-shelf components (COTS) </li></ul><ul><ul><li>e.g. wireless radios, sensors, I/O devices </li></ul></ul><ul><ul><li>Cheap </li></ul></ul><ul><li>Application-Specific ICs (ASICs) </li></ul><ul><ul><li>ICs tailored to meet application needs </li></ul></ul><ul><ul><li>Good performance for their intended task(s) </li></ul></ul><ul><ul><li>Original ESs were ASICs only </li></ul></ul><ul><li>Domain-specific processors </li></ul><ul><ul><li>DSPs(Digital signal processor) </li></ul></ul><ul><ul><li>Microcontrollers </li></ul></ul><ul><li>Microprocessors </li></ul><ul><ul><li>General Purpose Processors </li></ul></ul>Embedded System
  15. 15. <ul><li>Systems-on-chip </li></ul><ul><ul><li>Usual (or desired) specifications: </li></ul></ul><ul><ul><ul><li>32-bit RISC controller </li></ul></ul></ul><ul><ul><ul><li>Built-in interfaces to RAM and ROM </li></ul></ul></ul><ul><ul><ul><li>Built-in DMA, interrupt and timing controllers </li></ul></ul></ul><ul><ul><ul><li>Built-in interfaces to disk or flash memory </li></ul></ul></ul><ul><ul><ul><li>Built-in Ethernet/802.11 interfaces </li></ul></ul></ul><ul><ul><ul><li>Built-in LCD/CRT interfaces </li></ul></ul></ul><ul><li>Examples </li></ul><ul><ul><li>Intel Strong ARM SA-1110 </li></ul></ul><ul><ul><li>Motorola PowerPC MPC823e </li></ul></ul>Embedded System
  16. 16. <ul><li>An embedded operating system is the software program that manages all the other programs in an embedded device after initial load of programs by a boot loader. </li></ul><ul><li>Embedded Linux is inherited from Linux that has been modified and upgraded by developers in Linux community to be fit as an embedded operating system. It is normally said that embedded Linux has advantages of ‘portability’, ‘flexibility’, ‘lower cost’ and ‘development environments’. That is why embedded Linux is nowadays widely using in embedded devices </li></ul>Embedded System
  17. 17. Embedded System
  18. 18. What is a Microcontroller? <ul><li>A Microcontroller is essentially a small and self-sufficient computer on a chip, used to control devices. </li></ul><ul><li>It has all the memory and I/O it needs on board. </li></ul><ul><li>Is not expandable –no external bus interface. </li></ul><ul><li>Characteristics of a Microcontroller. </li></ul><ul><li>Low cost </li></ul><ul><li>Low speed, on the order of 10Khz-20 Mhz </li></ul><ul><li>Small architecture, usually an 8-bit architecture </li></ul><ul><li>Small memory size, but usually enough for the type of application it is intended for . </li></ul><ul><li>Limited I/O, but again, enough for the type of application it is intended for. </li></ul>
  19. 19. Microcontrollers <ul><li>Other features not usually found in general-purpose CPUs </li></ul><ul><ul><li>Expanded interrupt handling capabilities </li></ul></ul><ul><ul><ul><li>Automatic saving of context before handling interrupt </li></ul></ul></ul><ul><ul><ul><li>Interrupt vectoring to quickly jump to handlers </li></ul></ul></ul><ul><li>More instructions for bit manipulations </li></ul><ul><ul><ul><li>Support operations on bits (signal wires) rather than just words </li></ul></ul></ul><ul><li>Integrated memory and support functions for cheaper system cost </li></ul><ul><li>Built –in EEPROM, Flash, and/or RAM </li></ul><ul><li>DRAM controller to handle refresh </li></ul><ul><li>Page-mode support for faster block transfers </li></ul>
  20. 20. Mitsubishi Semiconductors is now “Renesas” M16C/26 family of microcontrollers – M30626 – 32K RAM, 384K Flash SKP = starter kit MDS = Microcontroller Data Embedded System
  21. 21. Three Criteria for Choosing Microcontroller <ul><li>Meeting the computing needs of the task efficiently and cost effectively </li></ul><ul><ul><li>speed, the amount of ROM and RAM, the number of I/O ports and timers, size, packaging, power consumption </li></ul></ul><ul><ul><li>easy to upgrade </li></ul></ul><ul><ul><li>cost per unit </li></ul></ul><ul><li>Availability of software development tools </li></ul><ul><ul><li>assemblers, debuggers, C compilers, emulator, simulator, technical support </li></ul></ul><ul><li>Wide availability and reliable sources of the microcontrollers. </li></ul>
  22. 22. The necessary tools for a microprocessor /controller <ul><li>CPU: Central Processing Unit </li></ul><ul><li>I/O: Input /Output </li></ul><ul><li>Bus: Address bus & Data bus </li></ul><ul><li>Memory: RAM & ROM </li></ul><ul><li>Timer(WDT) </li></ul><ul><li>Interrupt </li></ul><ul><li>Serial Port </li></ul><ul><li>Parallel Port </li></ul><ul><li>ADC(optional) </li></ul><ul><li>Bootloader(optional) </li></ul>
  23. 23. Microprocessor vs. Microcontroller <ul><li>Microprocessor </li></ul><ul><li>CPU is stand-alone, RAM, ROM, I/O, timer are separate </li></ul><ul><li>designer can decide on the amount of ROM, RAM and I/O ports. </li></ul><ul><li>expensive </li></ul><ul><li>versatility </li></ul><ul><li>general-purpose </li></ul><ul><li>Microcontroller </li></ul><ul><li>CPU, RAM, ROM, I/O and timer are all on a single chip </li></ul><ul><li>fix amount of on-chip ROM, RAM, I/O ports </li></ul><ul><li>for applications in which cost, power and space are critical single-purpose </li></ul>
  24. 24. Microcontroller Architectures CPU Program + Data Address Bus Data Bus Memory Von Neumann Architecture CPU Program Address Bus Data Bus Harvard Architecture Memory Data Address Bus Fetch Bus 0 0 0 2 n
  25. 25. Harvard Architecture <ul><li>Harvard Architecture refers to a memory structure where the processor is connected to two different memory banks via two sets of buses. </li></ul><ul><li>This is to provide the processor with two distinct data paths, one for instruction and one for data. </li></ul><ul><li>Through this scheme, the CPU can read both an instruction and data from the respective memory banks at the same time. </li></ul><ul><li>This inherent independence increases the throughput of the machine by enabling it to always prefetch the next instruction. </li></ul><ul><li>The cost of such a system is complexity in hardware. </li></ul><ul><li>Example- MCS-51 Family of Microcontroller, DSP’s </li></ul>
  26. 26. <ul><li>A Von-Neumann Machine, in contrast to the Harvard Architecture provides one data path (bus) for both instruction and data. </li></ul><ul><li>As a result, the CPU can either be fetching an instruction from memory, or read/writing data to it. </li></ul><ul><li>Other than less complexity of hardware, it allows for using a single, sequential memory. </li></ul><ul><li>Modern processors employ a Harvard Architecture to read from two instruction and data caches, when at the same time using a Von-Neumann Architecture to access external memory. </li></ul><ul><li>Example-Motorola 68HC11 Microcontroller </li></ul>
  27. 27. 8051 Microcontroller
  28. 28. Pin Description of the 8051 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RST (RXD)P3.0 (TXD)P3.1 (T0)P3.4 (T1)P3.5 XTAL2 XTAL1 GND (INT0)P3.2 (INT1)P3.3 (RD)P3.7 (WR)P3.6 Vcc P0.0(AD0) P0.1(AD1) P0.2(AD2) P0.3(AD3) P0.4(AD4) P0.5(AD5) P0.6(AD6) P0.7(AD7) EA/VPP ALE/PROG PSEN P2.7(A15) P2.6(A14) P2.5(A13) P2.4(A12) P2.3(A11) P2.2(A10) P2.1(A9) P2.0(A8) 8051 (8031)
  29. 29. Pin Description Pin No. Name Function Pins 1-8 Port 1 Input/Output Pin 9 RS Reset Pin 10-17 Port 3 Universal Input/Output Pin 10 RXD Serial asynchronous communication input or Serial synchronous communication output.
  30. 30. Pin 11 TXD Serial asynchronous/synchronous communication Pin 12 INT 0 Interrupt 0 input Pin 13 INT 1 Interrupt 1 input Pin 14 T 0 Counter 0 clock input Pin 15 T 1 Counter 1 clock input Pin 16 WR Write Pin 17 RD Read Pin 18,19 X 2, X 1 Internal oscillator I/O Pin 20 GND Ground
  31. 31. Pin 21-28 Port 2 If external memory is not in use then these pins are configured as universal I/O Pin 29 PSEN It is the read strobe to external memory Pin 30 ALE Will set the lower address byte (A0-A7) on Port 0 . Pin 31 EA When high executes instruction from internal program memory Pin 32-39 Port 0 Universal I/O pins
  32. 32. Microcontroller 8051 Internal Architecture
  33. 33. Programming Techniques <ul><li>Assembly Language </li></ul><ul><li>High Level Language </li></ul>
  34. 34. ASSEMBLY LANGUAGE <ul><li>All microcontroller run on simple binary codes </li></ul><ul><li>An assembly language is a low level language for programming microcontrollers . It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture </li></ul><ul><li>A utility program called an assembler is used to translate assembly language statements into the target computer's machine code. </li></ul><ul><li>The file produced by the assembler for PICs is given the .hex file suffix. The .hex file is what the PIC programmer tool uses to burn the program into the PICs program memory. </li></ul>
  35. 35. EDITOR ASSEMBLER LINKER INPUT THROUGH KEY BOARD .ASM FILE .OBJ FILE AND 1 ST FILE .HEX FILE .ASM FILE .OBJ
  36. 36. HIGH LEVEL LANGUAGE <ul><li>These languages are either designed specially for the purpose, or versions of general purpose languages such as the C programming language. </li></ul><ul><li>A compiler , analogous to an assembler, is used to translate high-level language statements into machine code; or an interpreter executes statements directly. </li></ul><ul><li>Interprete r firmware is also available for some microcontrollers. For example, BASIC on the early microcontrollers Intel 8052 [3] and Zilog Z8 as well as some modern devices. Typically these interpreters support interactive programming. </li></ul>
  37. 37. <ul><li>Simulators are available for some microcontrollers. </li></ul><ul><li>A simulator will show the internal processor state and also that of the outputs, as well as allowing input signals to be generated </li></ul><ul><li>can be the quickest way to debug and analyse problems. </li></ul><ul><li>Recent microcontrollers are often integrated with on-chip debug circuitry that when accessed by an In-circuit emulator via JTAG, allow debugging of the firmware with a debugger </li></ul>
  38. 38. Downfalls of Embedded Systems   <ul><li>Problems with embedded systems are difficult to fix </li></ul><ul><li>Large Instruction Set Architecture </li></ul><ul><li>Reliability </li></ul>
  39. 39. References <ul><ul><li>http://www.embedded.com </li></ul></ul><ul><ul><li>http://www.wikipedia.org/wiki/Embedded_system </li></ul></ul><ul><ul><li>www.googlebooks.com </li></ul></ul><ul><ul><li>Microcontrollers-Ajay V Deshmukh </li></ul></ul>

×