Tan Nu

Embed Size (px)

Citation preview

  • 8/2/2019 Tan Nu

    1/14

    An embedded system is a computer system designed for specific control

    functions within a larger system,

    often with real-time computing constraints.[1][2] It is embedded as part of a

    complete device often including

    hardware and mechanical parts. By contrast, a general-purpose computer,

    such as a personal computer (PC),

    is designed to be flexible and to meet a wide range of end-user needs.

    Embedded systems control many devices

    in common use today.[3] Embedded systems contain processing cores that

    are typically either microcontrollers or

    digital signal processors (DSP).[4] The key characteristic, however, is being

    dedicated to handle a particular

    Since the embedded system is dedicated to specific tasks, design engineers

    can optimize it to reduce the size and

    cost of the product and increase the reliability and performance. Someembedded systems are mass-produced, benefiting

    from economies of scale.Physically, embedded systems range from portable

    devices such as digital watches and MP3 players,

    to large stationary installations like traffic lights, factory controllers, or the

    systems controlling nuclear power plants.

    Complexity varies from low, with a single microcontroller chip, to very high

    with multiple units, peripherals and networks

    mounted inside a large chassis or enclosure.

    Embedded systems are especially suited for use in transportation, fire safety,

    safety and security, medical applications and life critical systems as these

    systems can be isolated from hacking and thus be more reliable. For fire

    safety, the systems can be designed to have greater ability to handle higher

    temperatures and continue to operate. In dealing with security, the embedded

    systems can be self-sufficient and be able to deal with cut electrical and

    communication systems. [1]

    In addition to commonly described embedded systems based on small

    computers, a new class of miniature wireless devices called motes arequickly gaining popularity as the field of wireless sensor networking rises.

    Wireless sensor networking,WSN, makes use of miniaturization made

    possible by advanced IC design to couple full wireless subsystems to

    sophisticated sensors, enabling people and companies to measure a myriad

    of things in the physical world and act on this information through IT

    monitoring and control systems. These motes are completely self contained,

    http://www.embeddedsystem.com/http://en.wikipedia.org/wiki/Moteshttp://en.wikipedia.org/wiki/WSNhttp://en.wikipedia.org/wiki/WSNhttp://www.embeddedsystem.com/http://en.wikipedia.org/wiki/Moteshttp://en.wikipedia.org/wiki/WSN
  • 8/2/2019 Tan Nu

    2/14

    and will typically run off a battery source for many years before the batteries

    need to be changed or charged.

    Characteristics

    Gumstix Overo COM, a tiny, OMAP-based embedded computer-on-module

    with Wifi and Bluetooth.

    1. Embedded systems are designed to do some specific task, rather than be a

    general-purpose computer for multiple tasks. Some also have real-time

    performance constraints that must be met, for reasons such as safety and

    usability; others may have low or no performance requirements, allowing the

    system hardware to be simplified to reduce costs.

    2. Embedded systems are not always standalone devices. Many embedded

    systems consist of small, computerized parts within a larger device that

    serves a more general purpose. For example, the Gibson Robot Guitar

    features an embedded system for tuning the strings, but the overall purpose

    of the Robot Guitar is, of course, to play music.[5] Similarly, an embedded

    system in an automobile provides a specific function as a subsystem of the

    car itself.

    http://en.wikipedia.org/wiki/Gumstixhttp://en.wikipedia.org/wiki/OMAPhttp://en.wikipedia.org/wiki/Computer-on-modulehttp://en.wikipedia.org/wiki/Wifihttp://en.wikipedia.org/wiki/Bluetoothhttp://en.wikipedia.org/wiki/Real-time_computinghttp://en.wikipedia.org/wiki/Gibson_Robot_Guitarhttp://en.wikipedia.org/wiki/Embedded_system#cite_note-4http://en.wikipedia.org/wiki/Automobilehttp://en.wikipedia.org/wiki/File:Overo_with_coin.jpghttp://en.wikipedia.org/wiki/File:Overo_with_coin.jpghttp://en.wikipedia.org/wiki/Gumstixhttp://en.wikipedia.org/wiki/OMAPhttp://en.wikipedia.org/wiki/Computer-on-modulehttp://en.wikipedia.org/wiki/Wifihttp://en.wikipedia.org/wiki/Bluetoothhttp://en.wikipedia.org/wiki/Real-time_computinghttp://en.wikipedia.org/wiki/Gibson_Robot_Guitarhttp://en.wikipedia.org/wiki/Embedded_system#cite_note-4http://en.wikipedia.org/wiki/Automobile
  • 8/2/2019 Tan Nu

    3/14

    e-con Systems eSOM270 & eSOM300 Computer on Modules

    3. The program instructions written for embedded systems are referred to as

    firmware, and are stored in read-only memory orFlash memory chips. They

    run with limited computer hardware resources: little memory, small or non-

    existent keyboard or screen.

    User interface

    Embedded system text user interface using MicroVGA[nb 1]

    Embedded systems range from no user interface at all dedicated only to

    one task to complex graphical user interfaces that resemble modern

    computer desktop operating systems. Simple embedded devices usebuttons,

    LEDs, graphic or characterLCDs (for example popularHD44780 LCD)

    with a simple menu system.

    More sophisticated devices which use a graphical screen with touch sensingor screen-edge buttons provide flexibility while minimizing space used: the

    meaning of the buttons can change with the screen, and selection involves

    the natural behavior of pointing at what's desired.Handheld systems often

    have a screen with a "joystick button" for a pointing device.

    http://en.wikipedia.org/wiki/Firmwarehttp://en.wikipedia.org/wiki/Flash_memoryhttp://en.wikipedia.org/wiki/Text_user_interfacehttp://en.wikipedia.org/wiki/Embedded_system#cite_note-MicroVGA-5http://en.wikipedia.org/wiki/Desktop_operating_system#Graphical_user_interfaceshttp://en.wikipedia.org/wiki/Push-buttonhttp://en.wikipedia.org/wiki/LEDhttp://en.wikipedia.org/wiki/LCDhttp://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controllerhttp://en.wikipedia.org/wiki/Menu_(computing)http://en.wikipedia.org/wiki/Touch_screenhttp://en.wikipedia.org/wiki/Mobile_devicehttp://en.wikipedia.org/wiki/Mobile_devicehttp://en.wikipedia.org/wiki/File:MicroVGA_TUI_demoapp.jpghttp://en.wikipedia.org/wiki/File:MicroVGA_TUI_demoapp.jpghttp://en.wikipedia.org/wiki/File:ESOM270_eSOM300_Computer_on_Modules.jpghttp://en.wikipedia.org/wiki/File:ESOM270_eSOM300_Computer_on_Modules.jpghttp://en.wikipedia.org/wiki/Firmwarehttp://en.wikipedia.org/wiki/Flash_memoryhttp://en.wikipedia.org/wiki/Text_user_interfacehttp://en.wikipedia.org/wiki/Embedded_system#cite_note-MicroVGA-5http://en.wikipedia.org/wiki/Desktop_operating_system#Graphical_user_interfaceshttp://en.wikipedia.org/wiki/Push-buttonhttp://en.wikipedia.org/wiki/LEDhttp://en.wikipedia.org/wiki/LCDhttp://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controllerhttp://en.wikipedia.org/wiki/Menu_(computing)http://en.wikipedia.org/wiki/Touch_screenhttp://en.wikipedia.org/wiki/Mobile_device
  • 8/2/2019 Tan Nu

    4/14

    Some systems provide user interface remotely with the help of a serial (e.g.

    RS-232, USB, IC, etc.) or network (e.g. Ethernet) connection. This

    approach gives several advantages: extends the capabilities of embedded

    system, avoids the cost of a display, simplifies BSP, allows us to build rich

    user interface on the PC. A good example of this is the combination of an

    embedded web serverrunning on an embedded device (such as anIP

    camera) or a network routers. The user interface is displayed in a web

    browseron a PC connected to the device, therefore needing no bespoke

    software to be installed.

    Processors in embedded systems

    Secondly, embedded processors can be broken into two broad categories:

    ordinary microprocessors (P) and microcontrollers (C), which have many

    more peripherals on chip, reducing cost and size. Contrasting to the personalcomputer and server markets, a fairly large number of basic CPU

    architectures are used; there are Von Neumann as well as various degrees of

    Harvard architectures, RISC as well as non-RISC and VLIW; word lengths

    vary from 4-bit to 64-bits and beyond (mainly in DSP processors) although

    the most typical remain 8/16-bit. Most architectures come in a large number

    of different variants and shapes, many of which are also manufactured by

    several different companies.

    Peripherals

    Embedded Systems talk with the outside world viaperipherals, such as:

    Serial Communication Interfaces (SCI): RS-232, RS-422, RS-485 etc.

    Synchronous Serial Communication Interface: I2C, SPI, SSC and

    ESSI (Enhanced Synchronous Serial Interface)

    Universal Serial Bus (USB)

    Multi Media Cards (SD Cards, Compact Flash etc.)

    Networks: Ethernet, LonWorks, etc.

    Fieldbuses: CAN-Bus, LIN-Bus, PROFIBUS, etc.

    Timers: PLL(s), Capture/Compare and Time Processing Units

    Discrete IO: aka General Purpose Input/Output (GPIO)

    Analog to Digital/Digital to Analog (ADC/DAC)

    Debugging: JTAG, ISP, ICSP, BDM Port, BITP, and DP9 ports.

    http://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/USBhttp://en.wikipedia.org/wiki/I%C2%B2Chttp://en.wikipedia.org/wiki/Ethernethttp://en.wikipedia.org/wiki/Board_support_packagehttp://en.wikipedia.org/wiki/Embedded_HTTP_serverhttp://en.wikipedia.org/wiki/IP_camerahttp://en.wikipedia.org/wiki/IP_camerahttp://en.wikipedia.org/wiki/IP_camerahttp://en.wikipedia.org/wiki/Router_(computing)http://en.wikipedia.org/wiki/Web_browserhttp://en.wikipedia.org/wiki/Web_browserhttp://en.wikipedia.org/wiki/CPU_architecturehttp://en.wikipedia.org/wiki/CPU_architecturehttp://en.wikipedia.org/wiki/Von_Neumann_architecturehttp://en.wikipedia.org/wiki/Harvard_architecturehttp://en.wikipedia.org/wiki/RISChttp://en.wikipedia.org/wiki/VLIWhttp://en.wikipedia.org/wiki/Digital_signal_processorhttp://en.wikipedia.org/wiki/Peripheralhttp://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/RS-422http://en.wikipedia.org/wiki/RS-485http://en.wikipedia.org/wiki/I2Chttp://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bushttp://en.wikipedia.org/wiki/Universal_Serial_Bushttp://en.wikipedia.org/wiki/Ethernethttp://en.wikipedia.org/wiki/LonWorkshttp://en.wikipedia.org/wiki/Fieldbushttp://en.wikipedia.org/wiki/Controller_Area_Networkhttp://en.wikipedia.org/wiki/Local_Interconnect_Networkhttp://en.wikipedia.org/wiki/PROFIBUShttp://en.wikipedia.org/wiki/PLLhttp://en.wikipedia.org/w/index.php?title=Time_Processing_Unit&action=edit&redlink=1http://en.wikipedia.org/wiki/General_Purpose_Input/Outputhttp://en.wikipedia.org/wiki/Analog-to-digital_converterhttp://en.wikipedia.org/wiki/Digital-to-analog_converterhttp://en.wikipedia.org/wiki/JTAGhttp://en.wikipedia.org/wiki/In-System_Programminghttp://en.wikipedia.org/wiki/In_Circuit_Serial_Programming_(ICSP)http://en.wikipedia.org/wiki/Background_Debug_Mode_interfacehttp://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/USBhttp://en.wikipedia.org/wiki/I%C2%B2Chttp://en.wikipedia.org/wiki/Ethernethttp://en.wikipedia.org/wiki/Board_support_packagehttp://en.wikipedia.org/wiki/Embedded_HTTP_serverhttp://en.wikipedia.org/wiki/IP_camerahttp://en.wikipedia.org/wiki/IP_camerahttp://en.wikipedia.org/wiki/Router_(computing)http://en.wikipedia.org/wiki/Web_browserhttp://en.wikipedia.org/wiki/Web_browserhttp://en.wikipedia.org/wiki/CPU_architecturehttp://en.wikipedia.org/wiki/CPU_architecturehttp://en.wikipedia.org/wiki/Von_Neumann_architecturehttp://en.wikipedia.org/wiki/Harvard_architecturehttp://en.wikipedia.org/wiki/RISChttp://en.wikipedia.org/wiki/VLIWhttp://en.wikipedia.org/wiki/Digital_signal_processorhttp://en.wikipedia.org/wiki/Peripheralhttp://en.wikipedia.org/wiki/RS-232http://en.wikipedia.org/wiki/RS-422http://en.wikipedia.org/wiki/RS-485http://en.wikipedia.org/wiki/I2Chttp://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bushttp://en.wikipedia.org/wiki/Universal_Serial_Bushttp://en.wikipedia.org/wiki/Ethernethttp://en.wikipedia.org/wiki/LonWorkshttp://en.wikipedia.org/wiki/Fieldbushttp://en.wikipedia.org/wiki/Controller_Area_Networkhttp://en.wikipedia.org/wiki/Local_Interconnect_Networkhttp://en.wikipedia.org/wiki/PROFIBUShttp://en.wikipedia.org/wiki/PLLhttp://en.wikipedia.org/w/index.php?title=Time_Processing_Unit&action=edit&redlink=1http://en.wikipedia.org/wiki/General_Purpose_Input/Outputhttp://en.wikipedia.org/wiki/Analog-to-digital_converterhttp://en.wikipedia.org/wiki/Digital-to-analog_converterhttp://en.wikipedia.org/wiki/JTAGhttp://en.wikipedia.org/wiki/In-System_Programminghttp://en.wikipedia.org/wiki/In_Circuit_Serial_Programming_(ICSP)http://en.wikipedia.org/wiki/Background_Debug_Mode_interface
  • 8/2/2019 Tan Nu

    5/14

    Tools

    As with other software, embedded system designers use compilers,

    assemblers, and debuggers to develop embedded system software. However,

    they may also use some more specific tools:

    In circuit debuggers or emulators (see next section).

    Utilities to add a checksum orCRC to a program, so the embedded

    system can check if the program is valid.

    For systems using digital signal processing, developers may use a

    math workbench such as Scilab / Scicos, MATLAB / Simulink,

    EICASLAB, MathCad, Mathematica,orFlowStone DSP to simulate

    the mathematics. They might also use libraries for both the host and

    target which eliminates developing DSP routines as done in DSPnano

    RTOS and Unison Operating System. A model based development tool like VisSim lets you create and

    simulate graphical data flow and UML State chart diagrams of

    components like digital filters, motor controllers, communication

    protocol decoding and multi-rate tasks. Interrupt handlers can also be

    created graphically. After simulation, you can automatically generate

    C-code to the VisSimRTOS which handles the main control task and

    preemption of background tasks, as well as automatic setup and

    programming of on-chip peripherals.

    Custom compilers and linkers may be used to improve optimisation

    for the particular hardware. An embedded system may have its own special language or design

    tool, or add enhancements to an existing language such as Forth or

    Basic.

    Another alternative is to add a real-time operating system or

    embedded operating system, which may have DSP capabilities like

    DSPnano RTOS.

    Modeling and code generating tools often based on state machines

    Software tools can come from several sources:

    Software companies that specialize in the embedded market

    Ported from the GNU software development tools

    Sometimes, development tools for a personal computer can be used if

    the embedded processor is a close relative to a common PC processor

    http://en.wikipedia.org/wiki/Compilerhttp://en.wikipedia.org/wiki/Assemblershttp://en.wikipedia.org/wiki/Debuggerhttp://en.wikipedia.org/wiki/Cyclic_redundancy_checkhttp://en.wikipedia.org/wiki/Digital_signal_processinghttp://en.wikipedia.org/wiki/Scilabhttp://en.wikipedia.org/wiki/Scicoshttp://en.wikipedia.org/wiki/MATLABhttp://en.wikipedia.org/wiki/Simulinkhttp://en.wikipedia.org/wiki/EICASLABhttp://en.wikipedia.org/wiki/MathCadhttp://en.wikipedia.org/wiki/Mathematicahttp://en.wikipedia.org/w/index.php?title=FlowStone_DSP&action=edit&redlink=1http://en.wikipedia.org/wiki/DSPnano_RTOShttp://en.wikipedia.org/wiki/DSPnano_RTOShttp://en.wikipedia.org/wiki/Unison_Operating_Systemhttp://en.wikipedia.org/wiki/VisSimhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/VisSimhttp://en.wikipedia.org/wiki/RTOShttp://en.wikipedia.org/wiki/Preemption_(computing)http://en.wikipedia.org/wiki/Forth_(programming_language)http://en.wikipedia.org/wiki/BASIC_Stamphttp://en.wikipedia.org/wiki/Real-time_operating_systemhttp://en.wikipedia.org/wiki/Embedded_operating_systemhttp://en.wikipedia.org/wiki/DSPnano_RTOShttp://en.wikipedia.org/wiki/UML_toolhttp://en.wikipedia.org/wiki/UML_state_machinehttp://en.wikipedia.org/wiki/GNUhttp://en.wikipedia.org/wiki/Compilerhttp://en.wikipedia.org/wiki/Assemblershttp://en.wikipedia.org/wiki/Debuggerhttp://en.wikipedia.org/wiki/Cyclic_redundancy_checkhttp://en.wikipedia.org/wiki/Digital_signal_processinghttp://en.wikipedia.org/wiki/Scilabhttp://en.wikipedia.org/wiki/Scicoshttp://en.wikipedia.org/wiki/MATLABhttp://en.wikipedia.org/wiki/Simulinkhttp://en.wikipedia.org/wiki/EICASLABhttp://en.wikipedia.org/wiki/MathCadhttp://en.wikipedia.org/wiki/Mathematicahttp://en.wikipedia.org/w/index.php?title=FlowStone_DSP&action=edit&redlink=1http://en.wikipedia.org/wiki/DSPnano_RTOShttp://en.wikipedia.org/wiki/DSPnano_RTOShttp://en.wikipedia.org/wiki/Unison_Operating_Systemhttp://en.wikipedia.org/wiki/VisSimhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/VisSimhttp://en.wikipedia.org/wiki/RTOShttp://en.wikipedia.org/wiki/Preemption_(computing)http://en.wikipedia.org/wiki/Forth_(programming_language)http://en.wikipedia.org/wiki/BASIC_Stamphttp://en.wikipedia.org/wiki/Real-time_operating_systemhttp://en.wikipedia.org/wiki/Embedded_operating_systemhttp://en.wikipedia.org/wiki/DSPnano_RTOShttp://en.wikipedia.org/wiki/UML_toolhttp://en.wikipedia.org/wiki/UML_state_machinehttp://en.wikipedia.org/wiki/GNU
  • 8/2/2019 Tan Nu

    6/14

    As the complexity of embedded systems grows, higher level tools and

    operating systems are migrating into machinery where it makes sense. For

    example, cellphones,personal digital assistants and other consumer

    computers often need significant software that is purchased or provided by a

    person other than the manufacturer of the electronics. In these systems, an

    open programming environment such as Linux,NetBSD, OSGi or

    Embedded Java is required so that the third-party software provider can sell

    to a large market.

    Debugging

    Embedded debugging may be performed at different levels, depending on

    the facilities available. From simplest to most sophisticated they can be

    roughly grouped into the following areas:

    Interactive resident debugging, using the simple shell provided by the

    embedded operating system (e.g. Forth and Basic)

    External debugging using logging or serial port output to trace

    operation using either a monitor in flash or using a debug server like

    the Remedy Debuggerwhich even works for heterogeneous multicore

    systems.

    An in-circuit debugger (ICD), a hardware device that connects to the

    microprocessor via a JTAG orNexus interface. This allows the

    operation of the microprocessor to be controlled externally, but is

    typically restricted to specific debugging capabilities in the processor. An in-circuit emulator(ICE) replaces the microprocessor with a

    simulated equivalent, providing full control over all aspects of the

    microprocessor.

    A complete emulatorprovides a simulation of all aspects of the

    hardware, allowing all of it to be controlled and modified, and

    allowing debugging on a normal PC.

    Unless restricted to external debugging, the programmer can typically load

    and run software through the tools, view the code running in the processor,

    and start or stop its operation. The view of the code may be as HLLsource-

    code, assembly code or mixture of both.

    Because an embedded system is often composed of a wide variety of

    elements, the debugging strategy may vary. For instance, debugging a

    software- (and microprocessor-) centric embedded system is different from

    http://en.wikipedia.org/wiki/Cellphonehttp://en.wikipedia.org/wiki/Personal_digital_assistanthttp://en.wikipedia.org/wiki/Linuxhttp://en.wikipedia.org/wiki/NetBSDhttp://en.wikipedia.org/wiki/OSGihttp://en.wikipedia.org/wiki/Embedded_Javahttp://en.wikipedia.org/wiki/Debugginghttp://en.wikipedia.org/wiki/Remedy_Debuggerhttp://en.wikipedia.org/wiki/Multi-core_processorhttp://en.wikipedia.org/wiki/JTAGhttp://en.wikipedia.org/wiki/Nexus_(standard)http://en.wikipedia.org/wiki/In-circuit_emulatorhttp://en.wikipedia.org/wiki/Emulatorhttp://en.wikipedia.org/wiki/High-level_programming_languagehttp://en.wikipedia.org/wiki/Source-codehttp://en.wikipedia.org/wiki/Source-codehttp://en.wikipedia.org/wiki/Assembly_codehttp://en.wikipedia.org/wiki/Cellphonehttp://en.wikipedia.org/wiki/Personal_digital_assistanthttp://en.wikipedia.org/wiki/Linuxhttp://en.wikipedia.org/wiki/NetBSDhttp://en.wikipedia.org/wiki/OSGihttp://en.wikipedia.org/wiki/Embedded_Javahttp://en.wikipedia.org/wiki/Debugginghttp://en.wikipedia.org/wiki/Remedy_Debuggerhttp://en.wikipedia.org/wiki/Multi-core_processorhttp://en.wikipedia.org/wiki/JTAGhttp://en.wikipedia.org/wiki/Nexus_(standard)http://en.wikipedia.org/wiki/In-circuit_emulatorhttp://en.wikipedia.org/wiki/Emulatorhttp://en.wikipedia.org/wiki/High-level_programming_languagehttp://en.wikipedia.org/wiki/Source-codehttp://en.wikipedia.org/wiki/Source-codehttp://en.wikipedia.org/wiki/Assembly_code
  • 8/2/2019 Tan Nu

    7/14

    debugging an embedded system where most of the processing is performed

    by peripherals (DSP, FPGA, co-processor). An increasing number of

    embedded systems today use more than one single processor core. A

    common problem with multi-core development is the proper synchronization

    of software execution. In such a case, the embedded system design may wish

    to check the data traffic on the busses between the processor cores, which

    requires very low-level debugging, at signal/bus level, with a logic analyzer,

    for instance.

    Tracing Real-time operating systems (RTOS) often supports tracing of

    operating system events. A graphical view is presented by a host PC tool,

    based on a recording of the system behavior. The trace recording can be

    performed in software, by the RTOS, or by special tracing hardware. RTOS

    tracing allows developers to understand timing and performance issues of

    the software system and gives a good understanding of the high-level systembehavior. A good example is RTXCview, forRTXC Quadros by Quadros

    Systems, Inc..

    Reliability

    Embedded systems often reside in machines that are expected to run

    continuously for years without errors, and in some cases recover by

    themselves if an error occurs. Therefore the software is usually developed

    and tested more carefully than that for personal computers, and unreliable

    mechanical moving parts such as disk drives, switches or buttons areavoided.

    Specific reliability issues may include:

    1. The system cannot safely be shut down for repair, or it is too

    inaccessible to repair. Examples include space systems, undersea

    cables, navigational beacons, bore-hole systems, and automobiles.

    2. The system must be kept running for safety reasons. "Limp modes"

    are less tolerable. Often backups are selected by an operator.

    Examples include aircraft navigation, reactor control systems, safety-

    critical chemical factory controls, train signals.

    3. The system will lose large amounts of money when shut down:

    Telephone switches, factory controls, bridge and elevator controls,

    funds transfer and market making, automated sales and service.

    http://en.wikipedia.org/wiki/Logic_analyzerhttp://en.wikipedia.org/wiki/RTOShttp://en.wikipedia.org/wiki/Tracing_(software)http://www.quadros.com/RTXCviewhttp://en.wikipedia.org/wiki/RTXC_Quadroshttp://www.quadros.com/http://www.quadros.com/http://en.wikipedia.org/wiki/Logic_analyzerhttp://en.wikipedia.org/wiki/RTOShttp://en.wikipedia.org/wiki/Tracing_(software)http://www.quadros.com/RTXCviewhttp://en.wikipedia.org/wiki/RTXC_Quadroshttp://www.quadros.com/http://www.quadros.com/
  • 8/2/2019 Tan Nu

    8/14

    A variety of techniques are used, sometimes in combination, to recover from

    errorsboth software bugs such as memory leaks, and also soft errors in the

    hardware:

    watchdog timerthat resets the computer unless the software

    periodically notifies the watchdog

    subsystems with redundant spares that can be switched over to

    software "limp modes" that provide partial function

    Designing with a Trusted Computing Base (TCB) architecture[6]

    ensures a highly secure & reliable system environment

    An Embedded Hypervisoris able to provide secure encapsulation for

    any subsystem component, so that a compromised software

    component cannot interfere with other subsystems, or privileged-level

    system software. This encapsulation keeps faults from propagating

    from one subsystem to another, improving reliability. This may alsoallow a subsystem to be automatically shut down and restarted on

    fault detection.

    Immunity Aware Programming

    Interrupt controlled system

    Some embedded systems are predominantly interrupt controlled. This means

    that tasks performed by the system are triggered by different kinds of events.

    An interrupt could be generated for example by a timer in a predefined

    frequency, or by a serial port controller receiving a byte.

    These kinds of systems are used if event handlers need low latency and the

    event handlers are short and simple.

    Usually these kinds of systems run a simple task in a main loop also, but this

    task is not very sensitive to unexpected delays.

    Sometimes the interrupt handler will add longer tasks to a queue structure.

    Later, after the interrupt handler has finished, these tasks are executed by the

    main loop. This method brings the system close to a multitasking kernelwith discrete processes.

    About the 8051

    The Intel 8051 is an 8-bit microcontroller which means that most available

    operations are limited to 8 bits. There are 3 basic "sizes" of the 8051: Short,

    http://en.wikipedia.org/wiki/Soft_errorhttp://en.wikipedia.org/wiki/Watchdog_timerhttp://en.wikipedia.org/wiki/Trusted_Computing_Basehttp://en.wikipedia.org/wiki/Embedded_system#cite_note-6http://en.wikipedia.org/wiki/Embedded_Hypervisorhttp://en.wikipedia.org/wiki/Immunity_Aware_Programminghttp://en.wikipedia.org/wiki/Soft_errorhttp://en.wikipedia.org/wiki/Watchdog_timerhttp://en.wikipedia.org/wiki/Trusted_Computing_Basehttp://en.wikipedia.org/wiki/Embedded_system#cite_note-6http://en.wikipedia.org/wiki/Embedded_Hypervisorhttp://en.wikipedia.org/wiki/Immunity_Aware_Programming
  • 8/2/2019 Tan Nu

    9/14

    Standard, and Extended. The Short and Standard chips are often available in

    DIP (dual in-line package) form, but the Extended 8051 models often have a

    different form factor, and are not "drop-in compatible". All these things are

    called 8051 because they can all be programmed using 8051 assembly

    language, and they all share certain features (although the different models

    all have their own special features).

    Some of the features that have made the 8051 popular are:

    4 KB on chip program memory.

    128 bytes on chip data memory(RAM).

    4 reg banks.

    128 user defined software flags.

    8-bit data bus

    16-bit address bus 32 general purpose registers each of 8 bits

    16 bit timers (usually 2, but may have more, or less).

    3 internal and 2 external interrupts.

    Bit as well as byte addressable RAM area of 16 bytes.

    Four 8-bit ports, (short models have two 8-bit ports).

    16-bit program counter and data pointer.

    1 Microsecond instruction cycle with 12 MHz Crystal.

    8051 models may also have a number of special, model-specific features,

    such as UARTs, ADC, OpAmps, etc...

    Typical applications

    8051 chips are used in a wide variety of control systems, telecom

    applications, robotics as well as in the automotive industry. By some

    estimations, 8051 family chips make up over 50% of the embedded chip

    market.

  • 8/2/2019 Tan Nu

    10/14

    Pin diagram of the 8051 DIP

    Basic Pins

    PIN 9: PIN 9 is the reset pin which is used to reset the microcontrollers

    internal registers and ports upon starting up. (Pin should be held high for 2

    machine cycles.)

    PINS 18 & 19: The 8051 has a built-in oscillator amplifier hence we need to

    only connect a crystal at these pins to provide clock pulses to the circuit.

    PIN 40 and 20: Pins 40 and 20 are VCC and ground respectively. The 8051

    chip needs +5V 500mA to function properly, although there are lower

    powered versions like the Atmel 2051 which is a scaled down version of the

    8051 which runs on +3V.

    PINS 29, 30 & 31: As described in the features of the 8051, this chip

    contains a built-in flash memory. In order to program this we need to supply

    a voltage of +12V at pin 31. If external memory is connected then PIN 31,

    also called EA/VPP, should be connected to ground to indicate the presenceof external memory. PIN 30 is called ALE (address latch enable), which is

    used when multiple memory chips are connected to the controller and only

    one of them needs to be selected.We will deal with this in depth in the later

    chapters. PIN 29 is called PSEN. This is "program store enable". In order to

    use the external memory it is required to provide the low voltage (0) on both

    PSEN and EA pins.

    http://en.wikibooks.org/wiki/File:Pinouts8051.jpghttp://en.wikibooks.org/wiki/File:Pinouts8051.jpg
  • 8/2/2019 Tan Nu

    11/14

    Ports

    There are 4 8-bit ports: P0, P1, P2 and P3.

    PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port

    which can be used for a variety of interfacing tasks. The other ports P0, P2and P3 have dual roles or additional functions associated with them based

    upon the context of their usage.The port 1 output buffers can sink/source

    four TTL inputs. When 1s are written to portn1 pins are pulled high by the

    internal pull-ups and can be used as inputs.

    PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port, but Port P3

    has additional functions such as, serial transmit and receive pins, 2 external

    interrupt pins, 2 external counter inputs, read and write pins for memory

    access.

    PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8

    bit port when no external memory is present, but if external memory access

    is required then PORT P2 will act as an address bus in conjunction with

    PORT P0 to access external memory. PORT P2 acts as A8-A15, as can be

    seen from fig 1.1

    PORT P0 (pins 32 to 39) PORT P0 can be used as a general purpose 8 bit

    port when no external memory is present, but if external memory access is

    required then PORT P0 acts as a multiplexed address and data bus that canbe used to access external memory in conjunction with PORT P2. P0 acts as

    AD0-AD7, as can be seen from fig 1.1

    Oscillator Circuits

    The 8051 requires an external oscillator circuit. The oscillator circuit usually

    runs around 12MHz, although the 8051 (depending on which specific

    model) is capable of running at a maximum of 40MHz. Each machine cycle

    in the 8051 is 12 clock cycles, giving an effective cycle rate at 1MHz (for a

    12MHz clock) to 3.33MHz (for the maximum 40MHz clock). The oscillatorcircuit generates the clock pulses so that all internal operations are

    synchronized.

    Internal Architecture

  • 8/2/2019 Tan Nu

    12/14

    Internal schematics of the 8051.

    http://en.wikibooks.org/wiki/File:Intel_8051_arch.svghttp://commons.wikimedia.org/wiki/File:Intel_8051_arch.svg
  • 8/2/2019 Tan Nu

    13/14

    Data and Program Memory

    The 8051 Microcontroller can be programmed in PL/M, 8051 Assembly, C

    and a number of other high-level languages. Many compilers even have

    support for compiling C++ for an 8051.

    Program memory in the 8051 is read-only, while the data memory is

    considered to be read/write accessible. When stored on EEPROM or Flash,

    the program memory can be rewritten when the microcontroller is in the

    special programmer circuit.

    Program Start Address

    The 8051 starts executing program instructions from address 0000 in the

    program memory. The A register is located in the SFR memory location

    0xE0. The A register works in a similar fashion to the AX register of x86

    processors. The A register is called the accumulator, and by default it

    receives the result of all arithmetic operations.

    Special Function Register

    The Special Function Register (SFR) is the upper area of addressable

    memory, from address 0x80 to 0xFF. A, B, PSW, DPTR are called SFR.This

    area of memory cannot be used for data or program storage, but is instead a

    series of memory-mapped ports and registers. All port input and output cantherefore be performed by memory mov operations on specified addresses in

    the SFR. Also, different status registers are mapped into the SFR, for use in

    checking the status of the 8051, and changing some operational parameters

    of the 8051.

    General Purpose Registers

    The 8051 has 4 selectable banks of 8 addressable 8-bit registers, R0 to R7.

    This means that there are essentially 32 available general purpose registers,

    although only 8 (one bank) can be directly accessed at a time. To access theother banks, we need to change the current bank number in the flag status

    register.

  • 8/2/2019 Tan Nu

    14/14

    A and B Registers

    The A register is located in the SFR memory location 0xE0. The A register

    works in a similar fashion to the AX register of x86 processors. The A

    register is called the accumulator, and by default it receives the result of all

    arithmetic operations. The B register is used in a similar manner, except that

    it can receive the extended answers from the multiply and divide operations.

    When not being used for multiplication and Division, the B register is

    available as an extra general-purpose register.

    MICROCONTROLLER 89S52: