2.Project Steps

download 2.Project Steps

of 4

Transcript of 2.Project Steps

  • 8/9/2019 2.Project Steps

    1/4

    2.PROJECTS STEPS

    Putting together a micro controller’s project involves several steps:

    2.1 Define the task 

    2.2 Design and build the circuits

    2.3 Write the controls program

    2. !est and debug.

    !o see "hat’s involved in each step# let’s look at each in more detail.

    2.1. Define the task 

    $ver% project begins "ith an idea or a problem that needs a solution i.e.# ho" can & monitor light

    intensit% at different locations and times to find the best location for a solar collector' (r ho"

    can & automate the process of drilling printed )circuit board s' (r ho" can & create a computer*

    controlled# animated displa% for a store "indo"'

     (nce %ou kno" "hat to accomplish# %ou need to determine "hether that idea is been re+uired to

    computer. &n general# a computer is the "a% to go "hen the circuits must make comple,

    decisions or deal "ith comple, data. -or e,ample# a simple /D gate can easil% decide "hether 

    or not t"o inputs are both valid logic highs# and "ill changes its output accordingl%. 0ut it

    re+uire man% small*scale chips to build a circuit that stores a series of values representing sensor 

    outputs and times the% occurred and displa% easil%.

  • 8/9/2019 2.Project Steps

    2/4

    2.2 Design and building 

    When %ou’re read% to design and build the circuits for a project# there are several "a%s to

     proceed. ou can design %our circuits from scratch. ou can bu% an assembled single*broad

    computer# adding onl% the interfaces and programming %our application re+uires and %ou can

    also build %ourself# but %ou can also use a kit or assembled broad as a base.

     

    2.2.1 Choosing a chip:

    Does it matter "hich micro controllers chip %ou use' ll micro controllers contain a P# and

    chances are that %ou can use an% of several devices for a specific project.4icro controllers are

    also characteri5ed b% ho" man% bits of data the% process at once# "ith a higher number of bits

    generall% including a faster or more po"erful chip. $ight*bit chips are popular for simpler 

    design# but *bits# 16*bits# and 32*bits architectures are also available.

    Po"er consumption is another consideration# especiall% for batter%*po"ered s%stems. hips

    manufactured "ith 4(7 processes usuall% have lo"er po"er consumption than those

    manufactured "ith /4(7 processes.

    2.3 Writing the controls program

    When it’s time to "rite program that controls %our project# the options include using

    machine code# assembl% language# or a higher*level language. Which programming language %ou

    use depends on things like desired e,ecution speed# program length# and convenience as "ell as

     price range.

    2.3.1 Machine code:

  • 8/9/2019 2.Project Steps

    3/4

    !he most fundamental program form is machine code# the binar% instruction that causes

    the P to perform the operations.

    2.3.2 Assembly language:

    (ne step removed from machine code is assembl% language# "here abbreviation called

    mnemonics 8memor% aids9 substitute for the machine codes. !he mnemonics are easier to

    remember than the machine codes.

    2.3.3 igher!le"el language.

    disadvantage to assembl% language is that each device famil% has its o"n set of 

    mnemonics# so %ou have to learn a ne" vocabular% for each famil%. !o get around this program#

    higher*level languages like # Pascal# -ortran# -orth# and 07& follo"s a standard s%nta,.

     

    2.3.# $nterpreters and compliers

    &nterpreters and compliers are t"o forms of higher*level languages. n interpreter 

    translates a program into machine code each time the program runs# "hile a complier translates

    onl% once# creating a ne"# e,ecutable that the computer runs directl%# "ithout re*translating.

    #. %esting and Debugging

    fter %ou;ve "ritten a program# it’s time to test nit and find correct mistakes to get it

    "ork properl%. !he process of ferreting out and correcting mistakes is called debugging. $as%

    debugging and troubleshooting can make a big difference in ho" long it takes to get a s%stem up

    and running. We have several options.

    2.# %esting in &'()M:.

  • 8/9/2019 2.Project Steps

    4/4

    (ne "a% is to burn %our program into $Pike simulator# an

    emulator lets %ou control program e,ecution and monitor "hat happens at each program step.

    4icroprocessor emulators t%picall% are e,pensive.