embed system designing

download embed system designing

of 24

Transcript of embed system designing

  • 7/25/2019 embed system designing

    1/24

    r. Bassel SoudanEmbedded Systems Design 1

    Embedded Systems Design

    0403334

  • 7/25/2019 embed system designing

    2/24

    r. Bassel SoudanEmbedded Systems Design 2

    Embedded Systems Overview

    Computing systems are everywhere

    Most of us think of desktop! "omputers# $C%s

    # &aptops

    # Mainframes

    # Servers

    'ut there%s another type of "omputing system# (ar more "ommon)))

  • 7/25/2019 embed system designing

    3/24

    r. Bassel SoudanEmbedded Systems Design 3

    Embedded Systems Overview

    Embedded "omputing systems*# Computing systems embedded within e+e"troni"

    devi"es)

    # ,ard to define) -ear+y any "omputing system

    other than a desktop "omputer)

    # 'i++ions of units produ"ed year+y. versus mi++ions of

    desktop units)

    # $erhaps /0 per househo+d and per automobi+e)

  • 7/25/2019 embed system designing

    4/24

    r. Bassel SoudanEmbedded Systems Design 4

    Common Chara"teristi"s of Embedded Systems

    Sing+efun"tioned# E1e"utes a sing+e program. repeated+y)

    2ight+y"onstrained

    # &ow "ost. +ow power. sma++. fast. et")

    ea"tive and rea+time# Continua++y rea"ts to "hanges in the system%s

    environment)

    # Must "ompute "ertain resu+ts in rea+time without

    de+ay)

  • 7/25/2019 embed system designing

    5/24

    r. Bassel SoudanEmbedded Systems Design 5

    Design Constraints

    &imited $ower)# Most embedded systems operate within battery operated

    euipment)

    &imited Memory)

    # 5n embedded system is "onstrained to a finite and sma++amount of memory)

    ea+2ime)# Most embedded systems are used in a "ontro+ fun"tion)

    # 2hey are e1pe"ted to sense the rea+time status of the

    system in whi"h they are housed and produ"e rea+time

    responses)

  • 7/25/2019 embed system designing

    6/24

    r. Bassel SoudanEmbedded Systems Design 6

    Definition of Embedded System

    5n embedded system is a mi"ropro"essorbasedsystem that is bui+t to "ontro+ a fun"tion or rangeof fun"tions and is not designed to be

    programmed by the end user)

    # 2he user may make "hoi"es "on"erning the

    fun"tiona+ity of the system but "annot "hange the

    fun"tiona+ity of the system by adding6rep+a"ing

    software)

    # Can you program! your refrigerator7

    May be sooner than you think)

  • 7/25/2019 embed system designing

    7/24

    r. Bassel SoudanEmbedded Systems Design 7

    5dvantages of Mi"ropro"essorbased

    ep+a"ement of dis"rete +ogi"based "ir"uits) $rovide fun"tiona+ upgrades) $rovide easy maintenan"e upgrades) 8mprove me"hani"a+ performan"e)

    $rote"tion of inte++e"tua+ property 98$:) ep+a"ement of ana+og "ir"uits)

  • 7/25/2019 embed system designing

    8/24

    r. Bassel SoudanEmbedded Systems Design 8

    E+ements of an Embedded System

    $ro"essor Memory

    # $rovide storage for the software and data)

    $eriphera+s

    Software# 8nitia+i;ation and Configuration)

    # Operating System)

    # 2he app+i"ation software)

    # Error hand+ing)

    # Debug and maintenan"e support)

  • 7/25/2019 embed system designing

    9/24

    r. Bassel SoudanEmbedded Systems Design 9

    Embedded System Mi"ro"ontro++er

    Embedded systems are main+y intended toprovide "ontro+ over the behavior of the systeminto whi"h they are housed)

    # 2herefore. it is "ustomary to ta+k about anembedded "ontro++er rather than an embedded

    pro"essor)# 8t does pro"ess information but main+y for the

    purpose of "ontro+)

  • 7/25/2019 embed system designing

    10/24

    r. Bassel SoudanEmbedded Systems Design 10

  • 7/25/2019 embed system designing

    11/24

    r. Bassel SoudanEmbedded Systems Design 11

    '+o"k Diagram of a Mi"ropro"essor

    5 mi"ropro"essor "onsists of an 5&= to performarithmeti" and +ogi" manipu+ations. registers. and a"ontro+ unit)

    8n addition.its has someinterfa"es tothe outsidewor+d in theform of busses)

  • 7/25/2019 embed system designing

    12/24

    r. Bassel SoudanEmbedded Systems Design 12

    '+o"k Diagram of a Mi"ro"omputer

    2oo mu"h)# (or the +imited app+i"ations intended. this system has too

    mu"h of everything) Meaning # too e1pensive)

  • 7/25/2019 embed system designing

    13/24

    r. Bassel SoudanEmbedded Systems Design 13

    ,ow do we Define E1pensive7

    Money)# 2he system reuires parts that "ost too mu"h money)

    Si;e)# 5++ of the additiona+ fun"tiona+ity reuires spa"e)

    Chip area or board spa"e)

    $ower)# heat)

    # Operating inside! another system may not afford us goodheat dissipation)

    Effi"ien"y)# 5re we rea++y uti+i;ing a++ of these features and

    fun"tiona+ities7

  • 7/25/2019 embed system designing

    14/24

    r. Bassel SoudanEmbedded Systems Design 14

    '+o"k Diagram of a Mi"ro"ontro++er

    8t is the spe"ia+i;ed "ir"uitry "ompared to themi"ropro"essor that makes the mi"ro"ontro++ersu"h a uniue devi"e)

    2he mi"ro"ontro++eroperates on data thatis fed in through its

    seria+ or para++e+ input

    ports "ontro++ed bythe software stored

    in the on"hip

    memory)

  • 7/25/2019 embed system designing

    15/24

    r. Bassel SoudanEmbedded Systems Design 15

    Spe"ia+ (eatures of the Mi"ro"ontro++er

    5++ of the additiona+ fun"tions bui+t into the mi"ro"ontro++er

    wou+d norma++y reuire additiona+ "ir"uitry e1terna+ to themi"ropro"essor)# 86O $orts)

    # Memory)

    Some of these fun"tions wou+d norma++y be imp+ementedin software)# Counters. timers)

  • 7/25/2019 embed system designing

    16/24

    r. Bassel SoudanEmbedded Systems Design 16

    Memory Considerations

  • 7/25/2019 embed system designing

    17/24

    r. Bassel SoudanEmbedded Systems Design 17

    5dditiona+ $rogramming Considerations

    8n a standard "omputer. there is a "omp+i"atedoperating system that hand+es a++ +ow+eve+operations)

    # 2hings +ike reading from interfa"ing to the different

    devi"es. and a++o"ating memory)

    (or an embedded system. the app+i"ation storedin the OM of the mi"ro"ontro++er is the on+y

    software that wi++ e1e"ute)

    # 2herefore. a++ +ow+eve+ "ode and devi"e interfa"es

    ne"essary to e1e"ute the app+i"ation have to be

    in"+uded)

  • 7/25/2019 embed system designing

    18/24

    r. Bassel SoudanEmbedded Systems Design 18

    E1amp+e of a $C program

    2his "ode simp+y "a++s

    the operating systemthat wi++ print the

    message stored at the

    +o"ation Msg! and

    returns e1e"ution to

    the operating system)

    2o e1e"ute thisprogram in a

    mi"ro"ontro++er. this

    "ode wou+d be"onsiderab+y +onger)))

    MAIN:

    mov AH, 9 ; Program start

    lds DX, Msg ; Print message

    int 0!"

    mov AH, 0#$" ; End t"e %rogram

    &or A', A' ; (it" a ret)rn *ode

    int !" ; o+ 0-

    Msg db Hello .orld-, 00D", 00A", 0

  • 7/25/2019 embed system designing

    19/24

    r. Bassel SoudanEmbedded Systems Design 19

    E1amp+e of a mi"ro"ontro++er program

    'e"ause the disp+aysubroutine in"+udingits initia+i;ation has

    to be written)

    2he software hasa+so to know where

    the devi"e is

    "onne"ted to and to

    make sure that the

    devi"e is "onne"ted

    proper+y)

    LCD_INIT proc

    setb B_LCDONOFF ; LCD Display On

    clr B_LCDCURSOR ; Cursor Off

    clr B_LCDBLINK ; No Blinin!

    ;

    call IO_LCD"N_LO ; Clear LCD "nable

    call l#p$ ; Sen% Init Byte

    call l#p$ ; Sen% Init Byte& '!ain

    call l#p$ ; Sen% Init Byte& '!ain

    call l#p$ ; Sen% Init Byte& '!ain

    call LCD_D(OD ; Set Display (o%e

    call LCD_CL"'R ; Clear Display

    call LCD_)'IT ; )ait For Display To Finis*

    +o, a&-.....$$.b ; "ntry (o%e& Increase )it* No S*iftin!

    call LCD_IOC ; Strobe Data To Display

    +o, D_LCD/OS&-...* ; Set Initial Cursor To .

    ret ; Return To Caller

    ;

    l#p$ +o, a&-..$$....b ; Function Set& 0 Bits& $ Line& 1 2 3 Dots

    call LCD_IOC ; Strobe Data To LCD Display

    +o, r4&-.ff* ; R4 5 ff

    +o, r6&-.ff* ; R6 5 ff

    l#p6 %7n8 r4&l#p6 ; Loop

    %7n8 r6&l#p6 ; )aste (ore T*an 9:$ (s

    ret ; Return To Caller

    en%proc

  • 7/25/2019 embed system designing

    20/24

    r. Bassel SoudanEmbedded Systems Design 20

    Mi"ro"ontro++er vs) Mi"ropro"essor

    Mi"ropro"essor 9$:*# Designed to perform as a C$= in a mi"ro"omputer

    system)

    # 2he instru"tion set is arranged to a++ow "ode and

    +arge amounts of data to be moved between the

    $ and the e1terna+ memory and registers)

    # Operations on not +ess than four bits)

    Mi"ro"ontro++er 9C:*#

    Designed to operate with minimum of e1terna+"ir"uitry)

    # Simp+e instru"tion set 9?// instru"tions:)

    # Operations possib+e on sing+e bits @

  • 7/25/2019 embed system designing

    21/24

    r. Bassel SoudanEmbedded Systems Design 21

  • 7/25/2019 embed system designing

    22/24

    r. Bassel SoudanEmbedded Systems Design 22

    Evo+ution of mi"ro"ontro++ers

    Mi"ro"ontro++er evo+ved from a board+eve+ design to a

    sing+e "hip in the midB0s) 5s the pro"ess ofminiaturi;ation "ontinued. a++ of the "omponents needed

    for a "ontro++er were bui+t right onto one "hip)

    8n the midBF0%s embedded systems migrated from thesing+e "hip to mi"ro"ontro++ers embedded into a +arger

    5S8C 95pp+i"ation Spe"ifi" 8ntegrated Cir"uit: design)

  • 7/25/2019 embed system designing

    23/24

    r. Bassel SoudanEmbedded Systems Design 23

    5dvantages of using mi"ro"ontro++ers

    (ast and effe"tive

    # 2he ar"hite"ture "orre+ates "+ose+y with the prob+em beingso+ved 9"ontro+ systems:)

    &ow "ost 6 &ow power# ,igh +eve+ of system integration within one "omponent)

    # On+y a handfu+ of "omponents needed to "reate a working

    system) Compatibi+ity

    # Op"odes and binaries are the S5ME for a++ F01/B variants)

    Mu+tisour"ed# Over B? manufa"turers. hundreds of varieties)

    Constant improvements# 8mprovements in si+i"on6design in"rease speed and power

    annua++y)

  • 7/25/2019 embed system designing

    24/24

    r. Bassel SoudanEmbedded Systems Design 24