Top Banner

of 12

Embedded system for Computers

May 30, 2018



  • 8/14/2019 Embedded system for Computers.


    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 1

    Embedded App l i ca t i on Sy st e m s - 1

    I n t r o d u c t i o n

    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 2

    Learn ing Objec t ives

    Interpreting Design RequirementsUnderstanding Manufacturers Spec SheetsSelection of Appropriate DevicesInterfacing the CPU to External DevicesQuality by Design:

    Worst Case Design and AnalysisDevelopment and Debug

    You should know how to do the following things after reaching the end of thiscourse:

    Interpret design requirements for the design of an embedded controller

    Read and understand the manufacturer's specification sheets

    Select appropriate ICs for the design

    Design simple I/O (Input/Output) interfaces

    Interface the CPU, memory, and I/O devices to a common bus

    Define the decoding and interconnection of the major components

    Perform a worst case analysis of the timing and loading of all signals

    Understand the software development cycle for a microcontroller Debug and test the hardware and software designs

    These tasks represent the major skills required in the successful application of anembedded micro. In addition, other abilities such as the design andimplementation of simple user programmable logic will be covered as required tosupport the proficient application of the technology.

  • 8/14/2019 Embedded system for Computers.


  • 8/14/2019 Embedded system for Computers.


    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 5

    Von Neumann Arch i t ec t u r e

    Single Memory for:ProgramsData

    FamiliarMost FlexibleUsed in PCsSpeed Bottle-neck:

    Memory Interface

    There are also differences in the basic CPU architectures used, that tend to reflectthe application. Microprocessor based machines usually have a von Neumann

    architecture that has a single memory for both programs and data to allowmaximum flexibility in allocation of memory.

    The von Neumann machine, with only one memory, requires all instruction anddata transfers to occur on the same interface. This is sometimes referred to as the"von Neumann bottleneck." In common computer architectures, this is the

    primary upper limit to processor throughput.

    This is the architecture of most general purpose CPUs, such as those used in personal computers.

    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 6

    Harva rd Arch i t ec t u r e

    Separate Memory for:Programs andData

    Advantages:FasterOverlap Transfers

    Instruction FetchData Transfer

    Cant execute Data!

    Microcontroller chips, on the other hand, frequently embody the Harvardarchitecture, which have separate memories for programs and data.

    One advantage this has for embedded applications is due to the two types of memory needed for embedded systems.

    Non-volatile memory (Read only memory or ROM) that does not loseits contents upon loss of power.

    Read/write volatile memory (RAM) that loses its contents when power is removed.

    There are two memories in an embedded system, with the fixed program residing

    in non-volatile ROM memory, and the working variable data storage residing involatile RAM.

    The Harvard architecture has the potential advantage of a separate interfaceallowing twice the memory transfer rate by allowing instruction fetches to occur in parallel with data transfers. Unfortunately, in most Harvard architecturemachines, the memory is connected to the CPU using a bus that limits the

    parallelism to a single bus.

  • 8/14/2019 Embedded system for Computers.


    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 7

    Bus Or i en t ed Mic roc ompu t e r

    Microprocessor ( P or uP) chips contain only the central processing unit (CPU),while microcontroller chips ( C or uC) include memory and some Input/Output

    (I/O) devices in addition to the CPU.A typical embedded computer consists of the CPU, memory, and I/O. They aremost often connected by means of a shared bus for communication, as shown inthe figure.

    The peripherals on a microcontroller chip are typically timers, counters, serial or parallel data ports, analog-to-digital and digital-to-analog converters that areintegrated directly on the chip. The performance of these peripherals is generallyless than that of dedicated peripheral chips that are frequently used withmicroprocessor chips.

    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 8

    One Chip Microc on t ro l l e r s

    Advantages:Fewer chips requiredLower cost andsmaller size of thewhole deviceLower powerFewer connectionsMore user I/O pinsHigher reliability

    Disadvantages:Reduced flexibilityLimited expansionLimited performanceLimited I/ODesign compromisedto fit everything on

    one chip

    Having the bus connections, CPU, memory, and I/O functions on one chip hasseveral advantages:

    - Fewer chips are required since most functions are already present on the processor chip.

    - Lower cost and smaller size result from a simpler design.

    - Lower power requirements because on-chip power requirements are muchsmaller than external loads.

    - Fewer external connections are required because most are made on-chip, andmost of the chip connections can be used for I/O.

    - More pins are available for user I/O - they aren't needed for the bus.

    - Reliability is higher since there are fewer components and interconnections.

    Of course there are disadvantages too, including:

    - Reduced flexibility: you can't change whats built into the chip

    - Expansion of memory or I/O is limited or impossible

    - Limited speed due to practical limits for a single chip

    - Lower performance I/O because of design compromises to fit everything onone chip

  • 8/14/2019 Embedded system for Computers.


    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 9

    Com put e r Des ign Hie ra rchy







    Another way of looking at a computer system is to look at the successivetranslations that occur from the high level code to the electrical signals that are

    really the only means of communication with the hardware. A computer systemcan be broken down into multiple levels or layers to show the translation of aspecific instruction into a form that can be directly processed by the computer hardware. The hierarchical levels are discussed in detail in "Structured Computer Organization," by A.S. Tanenbaum. This hierarchy is shown in the diagram.

    Language translators such as compilers and assemblers translate high level codeinto machine code that can be executed by the processor. The primary focus will

    be from the assembly and machine language level downward.

    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 10

    Dig i t a l Ha rdw are Concep t s

    CPU, memory, and I/O building blocks+ glue logic ( used to connect thevarious building blocks together)The most difficult and important task the hardware designer faces is theproper selection and specification of this glue logic.

    Devices: registers, buffers, drivers and decoders - to adapt the control signalsprovided by the CPU to those of the other devices.

    TTLPLD (programmable logic device) - has become an important device in connecting thebuilding blocks.

    Now microcontroller designers need to acquire the following skills:Interpretation of manufacturers specificationsDetailed, worst case timing analysis and design

    Worst case signal loading analysisDesign of appropriate signal and level conversion circuitsComponent evaluation and selectionProgrammable logic device selection and design

  • 8/14/2019 Embedded system for Computers.


    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 11

    Re v i ew o f b a si c e l e c t r o n ic s c o nc e pt s (1 )

    The glue logic (used to join the processor,memories, and I/O) is composed of:

    logic gates, composed of:transistors,

    diodes,resistors,and interconnecting wires.

    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 12

    Re v i ew o f b a si c e l e c t r o n ic s c o nc e pt s (2 )

    Voltage, Current, and R esistance A battery provides a voltage source for electricity (muchlike a pump provides a pressure source for a fluid).

    Voltage (or pressure) is required to produce current flowin the circuit.Resistance provides a limiting constraint on the amount of current that will actually flow. The resistor will allow acurrent to flow through it that is proportional to thevoltage across it, and inversely proportional to theresistance value. The magnitude of the voltage (V)generated by the battery is developed across the resistor,and the magnitude of the resistance (R), determine thecurrent (I).Note the return current path is often shown as ground, which is the reference voltage used as the zero volts point.

  • 8/14/2019 Embedded system for Computers.


    Embedded Application Systems 10/21/2009


    21 October 2009 Embedded Application Systems - 1 13

    Re v i ew o f b a si c e l e