embedded intro.doc

Upload: ankur-kumar

Post on 05-Jul-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/15/2019 embedded intro.doc

    1/23

  • 8/15/2019 embedded intro.doc

    2/23

    Introduction to Embedded Systems

    The embedded system is a combination of comuter hardware, software

    additional electrical 7 mechanical arts.A comuter is used in such devices rimarily as a means to simlify thesystem design and to rovide fle2ibility.

    8 /ften the user of the device is not even aware that a comuter is resent.

    8 !lectronic devices that incororate a comuter 9usually amicrorocessor: within their imlementation

    These are Real;time systems rocess events.These events occur on

    e2ternal inuts cause other events to occur as oututs. -inimi

  • 8/15/2019 embedded intro.doc

    3/23

    Programmi

    ng

    Logical/Dig

    ital

    Design

    Computer

    Systems

    Organization

    Embedded

    SystemsEmbed

    ded&

    Real

    Time

    System

    s

    Adance

    d

    Digital

    Design

    !Synt"esi

    s#

    $LS%/AS%

    C

    &

    SoCDesign

    Control

    System

    s

    DSP

  • 8/15/2019 embedded intro.doc

    4/23

    4rogramming Languages Used in #ew !mbedded0esigns 

    >

    0.0%

    10.0%

    20.0%

    30.0%

    40.0%

    50.0%

    60.0%

    70.0%

    80.0%

    90.0%

     Assembly C C++ Java Other 

    1998-1999

    1999-2000

  • 8/15/2019 embedded intro.doc

    5/23

    -icro Controllers Trend in the !mbedded $ystems

    0.0%

    20.0%

    40.0%

    60.0%

    80.0%

    100.0%

    4-bit 8-bit 16-bit 32-bit 64-bit Se!ial

  • 8/15/2019 embedded intro.doc

    6/23

    Application of embedded systems insphere of life

    Consumer electronics

    Telecommunication

    Automobile

    -edical instrumentation

    *ndustrial control e?uiment

    0efense

    Communication satellite

    0ata communication

    *nternet aliances

  • 8/15/2019 embedded intro.doc

    7/23

    Introduction to microcontroller

    A microcontroller is a comuter;on;a;chi, or, if you refer, a single;chicomuter. Micro suggests that the device is small, and controller tells you that thedevice might be used to control ob+ects, rocesses, or events. Another term todescribe a microcontroller is embedded controller, because the microcontroller andits suort circuits are often built into, or embedded in, the devices they control.

    3ou can find microcontrollers in all )inds of things these days. Any device thatmeasures, stores, controls, calculates, or dislays information is a candidate for

     utting a microcontroller inside. The largest single use for microcontrollers is inautomobiles@+ust about every car manufactured today includes at least onemicrocontroller for engine control, and often more to control additional systems inthe car. *n des)to comuters, you can find microcontrollers inside )eyboards,modems, rinters, and other eriherals. *n test e?uiment, microcontrollers ma)eit easy to add features such as the ability to store measurements, to create and storeuser routines, and to dislay messages and waveforms. Consumer roducts that usemicrocontrollers include cameras, video recorders, comact;dis) layers, andovens. And these are +ust a few e2amles.

    Microcontroller Basics

    A microcontroller is similar to the microrocessor inside a ersonal comuter.!2amles of microrocessors include *ntels BB(, -otorolas (B, and DilogsDB. oth microrocessors and microcontrollers contain a central rocessing unit,or C4U. The C4U e2ecutes instructions that erform the basic logic, math, anddata;moving functions of a comuter. To ma)e a comlete comuter, amicrorocessor re?uires memory for storing data and rograms, and inutEoutut

  • 8/15/2019 embedded intro.doc

    8/23

    9*E/: interfaces for connecting e2ternal devices li)e )eyboards and dislays. *ncontrast, a microcontroller is a single;chi comuter because it contains memoryand *E/ interfaces in addition to the C4U. ecause the amount of memory andinterfaces that can fit on a single chi is limited, microcontrollers tend to be used insmaller systems that re?uire little more than the microcontroller and a few suortcomonents. !2amles of oular microcontrollers are *ntels BFG 9including theBFG;A$*C, which is the focus of this boo):, -otorolas (BHC&&, and DilogsDB.

    Microcontroller History

    To understand how microcontrollers fit into the always;e2anding worldof comuters, we need to loo) bac) to the roots of microcomuting.*n its anuary &'F issue, 4oular !lectronics maga

  • 8/15/2019 embedded intro.doc

    9/23

     ersonal comuters are for the most art standard ones li)e those tovideo dislays, )eyboards, and rinters.ut along with chea, owerful, and versatile ersonal comuters hasdeveloed a new interest in small, customi

  • 8/15/2019 embedded intro.doc

    10/23

     

    &loc' diag am o( t"e )*C+, -ic ocont olle

  • 8/15/2019 embedded intro.doc

    11/23

    Pin Diagram of the ! Pin DIP "ac#age of the $!C%&

  • 8/15/2019 embedded intro.doc

    12/23

     

    $!%& architecture contains the follo'ing(

  • 8/15/2019 embedded intro.doc

    13/23

    B bit C4U with registers A and

    &( bit rogram counter94C: and data ointer904TR:

    B bit rogram status word94$K:

    B bit stac) ointer 

    *nternal R/- of 9B5&: to J9BF&:

    *nternal RA- of &GB ytes

    J register ban)s ;&f 

    &( bytes9bit addressable: G;Gf 

    B bytes of general urose data memory 5;f 

    5G *E/ ins arranged as four B bit orts 94 45:

    G &(;bit timerEcounters= T and T&

    6ull dule2 serial data receiverEtransmitter= $U6

    Control registers= TC/#, T-/0, $C/#, 4C/#, *4and *!

    G e2ternal and 5 internal interrut sources

    /scillator and cloc) circuits

  • 8/15/2019 embedded intro.doc

    14/23

    I)*R+D,C*I+) *+ *HE -EI. S+F*/ARE

    The eil $oftware BF& develoment tools are listed below. These are

    the rograms that will erform the following=

    Comile C Code

    Assemble the assembly source files.

    Lin) 7 Locate the ob+ect modules 7 the libraries.

    Create the H!M files.

    0ebug the Target 4rogram.

    -icro Nision G is an interegated develoment !nvironment thatCombines 4ro+ect management

    $ource Code !diting

    4rogram debugging.

    CSI A)SI= *t is an otyimi

  • 8/15/2019 embedded intro.doc

    15/23

    The R*0%&  real time oerating system simifies the design of thecomle2, time critical software ro+ects.

      INTRODUCTION TO THEPROJECT

    This ro+ect is designed to demonstrate the technology used in the now a

    days driver less metro train which is used in most of the develoed

    countries li)e Oermany, 6rance, and aan etc. These trains are e?uied

    with the C4U, which controls the train. The train is rogrammed for the

    secific ath. !very station on the ath is definedP stoage timing of the

    train and distance between the two stations is redefined.

    In this "ro1ect

    *n this ro+ect we try to give the same rototye for this tye of trains.

    Ke are using microcontroller B'cF& as C4U. The motion of the train is

    controlled by the steer motor, for dislaying message in the train we

    are using intelligent LC0 dislay of two lines. The train is designed for 

    three stations, named as odhgaya, Ra+gir, #alanda .the stoage time is

    of 5 sec and time between two consecutive stations is (sec.there is a

    LC0 dislay for showing various messages in the train for assengers.

    There are indicators, which are used to show the train direction i.e. U4

     ath and 0/K# ath. efore stoing at station the train blows the bu

  • 8/15/2019 embedded intro.doc

    16/23

    $o this ro+ect gives an illustration of actual modern metro train

    controlled through embedded electronics control system.

    Im"lementation( This ro+ect is imlemented using the following )it

    2P.3E*(  N4L;!T !mbedded trainer has been design by using

    4hillis B'C(&MGE microchi 4*C&(6BE -otorola (BHC&& -icro

    controller. This controller rovide in system as well as in alication

     rogramming so that one may be able to write rogram and download

    directly in the controller through serial ort without removing it from

    the system

     System Specification

    &. C4U= 4hillis B'C(&MGE microchi 4*C&(6BE -otorola (BHC&&

    G. &( 2 G LC0 -odule 9H3&(G6J:

    5. $i2 seven segment dislay

    J. $teer motor controller interface

    F. B 2 B L!0 -atri2 0islay

    (. A0CE0AC interface

    . 6our data switches

    B. $witch array

    '. AT GJC&( $erial !!4R/-

  • 8/15/2019 embedded intro.doc

    17/23

    Interfacing an .CD to the $!%&

    LCD Operation:

      O"r r$%e!t !h$se &C' $ver Seve( Se)me(t 'islays *"e t$

    the $ll$,i() reas$(s1/ase $ r$)ram $ !har!ters.2As!ii al"es !$"l* be *ire!tly se(t t$ the &C'.3( b"ilt !$mma(* ,$r*s t$ !$(tr$l 'islay.

    http://www.iguanalabs.com/lcdbblrg.jpg

  • 8/15/2019 embedded intro.doc

    18/23

     

    PIN DESCRIPTION OF LCD

     

    PIN Symbol I/O Description

    1 -- r$"(*

    2 -- +5 $,ers"ly

    3 -- $,er s"ly$r !$(trast

    !$(tr$l4 S 0 C$mma(*

    e).1 'ata e).

    5 0 rite1 ea*

    6 / O /(able

    7 '0 O 8-bit 'ata "s

    8 '1 O 8-bit 'ata "s

    9 '2 O 8-bit 'ata "s10 '3 O 8-bit 'ata "s

    11 '4 O 8-bit 'ata "s

    12 '5 O 8-bit 'ata "s

    13 '6 O 8-bit 'ata "s

    14 '7 O 8-bit 'ata "s

    CC SS //

      CC- r$vi*es +5 v$lt  SS r$vi*es )(*  // is "se* t$ !$(tr$l &C' !$(trast

  • 8/15/2019 embedded intro.doc

    19/23

    RS ( Register Select )

      S i( is "se* t$ sele!t bet,ee( the t,$ *iere(t re)isters

    'AA re)ister : theCO;;A ,he( rea*i()

      =0 => ,he( ,riti()  ( nable)

    he /(able i( is "se* by the &C' t$ lat!h i($rmati$(rese(te* t$ its *ata i(s . he( *ata is s"lie* t$ *ata i(s

    a ?? t$ &O "lse m"st be alie* t$ this i( i( $r*er $rthe &C' t$ lat!h i( the *ata rese(t i( the *ata i(s. his "lsem"st be a mi(im"m $ 450 (s ,i*e.

    D! " D#

      he 8 @ bit *ata i(s *0 @ '7 are "se* t$ se(* i($rmati$(t$ the &C' $r rea* the !$(te(t $ the &C' i(ter(al e)ister.  $ *islay letters a(* ("mbers ,e se(* ASC !$*es $r

    the letter A-B a- : 0-9 t$ these i(s ,hile maDi( S = 1.  here are als$ (str"!ti$( C$mma(* C$*es that !a( be se(tt$ the &C' t$ !lear the *islay $r $r!e the !"rs$r t$ the h$me$siti$( $r bli(D the !"rs$r.

     

  • 8/15/2019 embedded intro.doc

    20/23

    he $ll$,i() table lists the i(str"!ti$( !$mma(* !$*es

    Code ( $%)   C$mma(* t$ &C' i(st"!ti$( e)ister 

    1 Clear *islay s!ree(2 et"r( ?$me

    4 'e!reme(t C"rs$r shit !"rs$r t$ &et

    6 (!reme(t !"rs$r shit !"rs$r t$ ri)ht

    +   Shit *islay ri)ht

    .   Shit *islay let

    )   'islay $ C"rs$r $ 

    A   'islay $ C"rs$r $(C   'islay $( C"rs$r $ 

    E   'islay $( C"rs$r bli(Di()

      'islay $( C"rs$r li(Di()

    ,*   Shit !"rs$r $siti$( t$ let

    ,0   Shit !"rs$r $siti$( t$ ri)ht

    ,)   Shit the e(tire *islay t$ the let

    ,C   Shit the e(tire *islay t$ the ri)ht

    )*   E$r!e !"rs$r t$ be)i((i() $ 1st li(e

    C*   E$r!e !"rs$r t$ be)i((i() $ 2(* li(e

    1)   2 &i(es a(* 5F7 matriF

  • 8/15/2019 embedded intro.doc

    21/23

    CIRC,I* DIA4RAM

  • 8/15/2019 embedded intro.doc

    22/23

  • 8/15/2019 embedded intro.doc

    23/23

    • 0atasheets= www.datasheetarchive.com

    http://www.datasheetarchive.com/http://www.datasheetarchive.com/