Sie sind auf Seite 1von 20

UNIT I

ARCHITECTURE OF EMBEDDED SYSTEMS

Categories of Embedded Systems-Specifications of Embedded systemsRecent trends in Embedded Systems-Hardware Architecture-Software Architecture-Communication software-Process of generation of executable Image - development/ testing tools. Embedded system Definition An Embedded system is a system that has embedded software & computer hardware , which makes it a system dedicated for an application or specific part of an application or product or a part of a larger system . Categories of Embedded Systems Stand alone embedded systems Real time systems Networked information appliances Mobile devices

1. Stand alone embedded systems


Works in standalone mode It take inputs, process them and produce desired output i/p electrical signals from transducer or command from human being o/p electrical signals to drive another system , an LED or LCD display for displaying of information to the users. Application under this category 1)Process control 2) Automobiles 3) Consumer electronics EXAMPLES Digital Camera Microwave oven CD player

Air Conditioner TV

2. Real time systems


Real-time systems are defined as those systems in which the correctness of the system depends not only on the logical result of computation, but also on the time at which the results are produced. Hard real-time systems (e.g., Avionic control). Firm real-time systems (e.g., Banking). Soft real-time systems (e.g., Video on demand).

Hard vs. Soft Real Time Hard Real Time is necessary for critical missions such as heart pacemaker and industrial process controllers, where failure to meet a guaranteed response time could lead to catastrophic results. In Soft Real Time users are happier when the system responds optimally, but which is not considered to have "failed" when the system doesn't meet each and every desired response time. On average, a soft real-time system meets a particular response time goal.

3. Network Information Appliances Provided with network interfaces and accessed by networks such as LAN or the Internet called as NIA Connected to a network running TCP / IP protocol suite such as Internet or a company Intranet

EXAMPLE Weather Monitoring system 4. Mobile Devices such as mobile phones , PDA, smart phones

Limitations Memory Constraints

Small size Display

OVERVIEW OF EMBEDDED SYSTEM ARCHITECTURE Every embedded system consists of custom built hardware built around a CPU. This hardware also contains memory chips on to which the software is loaded. The software residing on the memory chip is also called the firmware.

Layered architecture The OS runs above the hardware and Application software runs above the OS.

Application software

OS

Hardware

Building blocks of an Embedded system CPU Memory (RAM& ROM) Input Devices Output Devices Communication Interfaces Application Specific Circuitry

ROM

RAM

INPUT DEVICES

CPU
APPLICATION SPECIFIC CIRCUITRY

OUTPUT DEVICES

COMMUNICATION INTERFACES

Central Processing Unit: It can be any of the following: Microcontroller low cost, best for small applications as they need less number of external components. Microprocessor - powerful but need to use many number of external components. DSP - used mainly for applications in which signal processing is involved such as audio & video processing. Memory : RAM & ROM RAM content of this erased if power is switched off to the chip ROM content of this not erased if power is switched off to the chip

Hence firmware is stored in ROM When the power is switched on , processor reads the ROM , the program transferred to RAM and the program is executed Input Devices: Input devices to an embedded system have very limited capability Many E.S have small keypad used to input only digits Many E.S are in process control they take input from sensors or transducers and produce electrical signals that are in turn fed to other systems Output Devices: Have very limited capability Have few LED to indicate the health status of the system modules or for visual indication of alarms A small LCD may also used to display some important parameters Communication Interfaces: provided with interfaces such as RS232, RS422,RS485, USB,IEEE1394,Ethernet Application Specific circuitry: Sensors, transducers, special processing and control circuitry may be required for an Embedded system, depending on application. This circuitry interacts with the processor to carry out necessary work

RECENT TRENDS IN EMBEDDED SYSTEMS 1. PROCESSOR POWER Growing importance of E.S can be gauged by the availability of processors

150 varieties are available from around 50 semiconductor vendors Powerful 8 bit, 16 bit,32 bit ,64 bit microcontrollers and microprocessors are available to cater to the different market segments Clock speed and memory addressing capability of these processors are increasing Very powerful DSP are also available for real time analysis of audio and video signals. 2. Memory Cost of memory is reducing day by day As a result the embedded systems can be made functionally rich by incorporating additional features such as networking protocols and even graphical user interfaces Now wristwatches with embedded Linux operating system are available 3. Operating systems Main advantage of embedding an operating system is that the software development will be very fast and maintaining the code is very easy Software can be developed in a high level language such as C If real time performance is required , a RTOS can be used Open source software campaign led to development of many open source operating systems 4. Communication Interfaces and Networking Capability Due to the enhanced memory capacities of the embedded systems,TCP/IP protocol stack and the HTTP server software can also be ported on to the system and such systems can be accessed over the Internet from anywhere on the earth . 5. Programming Languages C, C++ and Java are now catching up Java is its platform independence

Many applications are possible by Java Virtual Machine in an E.S Microsoft embedded visual tools can be used for development of embedded software applications 6. Development Tools MATLAB & Simulink can be used to model an embedded system as well as to generate code BREW, Java 2 Micro edition (J2ME), WAP facilitate easy development of applications s for mobile devices. 7. Programmable Hardware PLD and FPGA have the way for reducing the components on an embedded system, leading to small, low cost systems. After developing the prototype of an embedded system, for mass production an FPGA can be developed which will have all the functionality of the processor, peripherals as well as the application specific circuitry. System on Chip is the catchword that reflects the current developments in programmable hardware a single chip is the embedded system.

HARDWARE ARCHITECTURE OF EMBEDDED SYSTEM


The various building blocks of embedded system are 1. CPU 3. LCD 5. Function Keypad 7. RAM & ROM 2. Sensors 4.LED 6. Communication Interface 8. Debug port

9. Watchdog timer & Reset Circuitry 10.Chip Select 11. Clock circuitry 13. ADC & DAC 12. Power supply Unit

1. Central Processing Unit It has two categories a) General Purpose Processor (GPP) - classified as microcontroller and microprocessors b) Digital Signal Processor (DSP) CPU consist of ALU General Purpose registers constitute the processor internal memory . the number of registers varies from processor to processor . Register contain the current data and operands that are being manipulated by the processor Control Unit fetches the instruction from memory , decodes them and executes them. Control unit consist of a) Instruction pointer points to the next instruction to be executed (Program Counter) b) Stack pointer points to the stack in the memory c) Instruction Decoder decodes the instruction d) Memory Address Register & Memory Data Register Processor Architectures A processor has to read data and instructions from memory, read and write data to memory, write data to output devices and read data from input devices . To do these functions the processor communicates with other devices using 3 buses. These Buses are 1. Address Bus 2. Data Bus 3. Control & Status Bus

INTERACTION BETWEEN CPU & MEMORY

INTERRUPTS A Programmable interrupt Controller interfaces with the CPU to handle external devices and decide which interrupt has to be processed. An Interrupt table

MEMORY Various types of memory 1) Internal RAM of 256 or 512 bytes in a microcontroller for register, temporary data and stack 2) Internal ROM/ PROM / EPROM for about 4kB to 64 kB of program 3) External RAM for the temporary data and stack or internal caches . 4) Internal Flash Memory It is a type of EEPROM .The memory is divided in to sectors or blocks. Typical sector size is 256 bytes to 16 KB . Each sector is an erasable unit .when erased , the bits in that sector are set to 1 .As it is electrically erasable contents of the Flash Memory can be updated in the embedded system 5) External ROM or PROM 6) RAM memory buffers at ports

CLOCK CIRCUITRY The processor has to be given the clock input to one of the pins To generate the clock signal , a crystal and oscillator are required. For some processor , the oscillator circuitry is in built , only external crystal ha to be added to generate the clock signal A timer circuitry configured as RTC that generates system interrupt periodically for the schedulers, real time programs& periodic saving of date time of the system Real time clock keeps track of the date & time All Processor events are related to clock. Higher the clock frequency high speed WATCHDOG TIMER / RESET CIRCUITRY RESET CIRCUITRY Reset means that the processor begins the processing of instructions from a starting address. The address is set by default in the processor on a power up The reset circuit activates for a fixed period (for a few clock cycles) and then deactivates WATCHDOG TIMER Watchdog timer is a timing device that resets the system after a predefined timed out It is activated within the first few clock cycles after power up A watchdog timer (sometimes called a computer operating properly or COP timer, or simply a watchdog) is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly restarts the watchdog timer to prevent it from elapsing, or "timing out". If, due to a hardware fault or program error, the computer fails to restart the watchdog, the timer will elapse and generate a timeout signal. The timeout signal is used to initiate corrective action or actions. The corrective actions typically include placing the computer system in a safe state and restoring normal system operation.

Watchdog timers are commonly found in computer-controlled equipment where humans cannot easily access the equipment or would be unable to react to faults in a timely manner. Many embedded systems cannot depend on a human to reboot them if the software hangs; they must be self-reliant. Watch dog timer does the resetting

INPUT / OUTPUT DEVICES : It can be categorized as i) Programmed I/O and ii) Interrupt driven I/O . In Programmed I/O the processor sends the data to the device on its own . In Interrupt driven I/O , the processor is interrupted by an interrupt signal and the ISR is executed. ISR transfers the data from the input devices to the memory or memory to output device SENSORS & TRANSDUCERS 1. Temperature sensors convert the temperature in to an equivalent voltage Measurement of temperature in AC, boilers, coffins .. is done through this sensor Eg : AD22100, AD22103 and Dallas Semiconductor DS18B20 2. Light Sensors convert Light intensity in to an equivalent voltage eg : TAOS TSL250R 3. Accelerometer converts the acceleration into voltage 4. Pressure sensor convert pressure level in to voltage MPXA 6115A 5. Microphone & Speakers ADC & DAC DAC: Converts digital 8 or 10 or 12 bits to the analog output Analog output with respect to the reference voltage

When all the input bits are equal to 1 , then the analog output is the difference between the positive & negative reference pin When all the input bits are equal to 0, then the analog output equals negative reference pin. PWM with an Integrator circuit is used for DAC.

ADC: Converts analog to Digital The analog signal can be converted in to digital format in two stages 1. Sampling- the amplitude levels of the signal are measured at regular intervals 2. Quantization- the sampled value is converted in to a number

Process of Generating Executable Image the Procedure for creating and executing the application software is as follows i . Create the source file ii . Create the executable file iii. Give the command for execution iv. The process is loaded in to the RAM by the loader v. Loader transfers the control to the process and the process executes Application development on desktop computers is called native development as the development and execution are done on the same hardware platform. Embedded software cannot be developed directly on the embedded system Initially the development is done on a desktop computer and then transferred to the embedded system. This is known as cross platform development Procedure for creating & executing an application in an embedded system is different for the following reasons On desktop computers, there is a distinction between the operating system and application software , whereas in an embedded system everything is a single piece of code .

In an Embedded system, there is only one application that needs to run continuously On a desktop computers in which part of the memory the application is loaded is immaterial but in embedded systems you need to decide where the code will reside so that the processor executes the instruction from that memory location Desktop computers use virtual memory. In a multi tasking system , when a new process has to be executed , the presently running process is transferred to the virtual memory .In embedded system , the secondary storage is not available.

C/C++ source Files

Compiler
Object files

Executable image

Linker & Locator

Relocatable Files(.o,.a)

Assembly source Files

Assembler
Lib files .a, .lib Shared Object Files

Linker command File (.lnk)

CROSS PLATFORM DEVELOPMENT

Develop Software on Host system

Compilation & Linking

Download to Target system

Debugging on Target system

Is the system is OK?

Transfer software to ROM or FLASH Run Software on target system

Das könnte Ihnen auch gefallen