Connect with us

Please clear my doubts in embedded system

Discussion in 'Microcontrollers, Programming and IoT' started by vead, Sep 15, 2013.

Scroll to continue with content
  1. vead

    vead

    473
    14
    Nov 27, 2011
    hi,
    I have just started to read about embedded system. i know, to make project i need microcontroller, software and other things.
    in software terms i am confused i don't know actually when and where compiler and assembler are used in embedded project? don't give definitions please explain with example
    thank you very much for every help
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    Te compiler or assembler are used to write the code that runs on the micro-controller/microprocessor that is part of the equipment you design.
     
  3. vead

    vead

    473
    14
    Nov 27, 2011
    thanks steve for your reply. can you explain with example ?
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    I'm not going to do all of your homework for you.
     
  5. vead

    vead

    473
    14
    Nov 27, 2011

    ok, we write a program for the microcontroller in assembly language, and high level language
    like c program but i wan't to ask when we use assembly code and when we use to need c code
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    You can use either assembler OR C (or some other language). Sometimes you might use a combination of languages.

    The language is just like a... language. Some languages tend to be better than others at some things (Maybe you can make love to your processor in French, but resort to German for engineering). And sometimes you're more familiar with a particular language. Or maybe you have some code already written in a language. Or perhaps you don't have a C compiler.
     
  7. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Generally embedded software is mostly written in a medium-level language like C with assembly language used for specific situations where C is not suitable:

    1. If the device is severely resource-constrained (tiny amount of RAM and/or code memory);
    2. For sections that need to run as quickly as possible (hand-optimised assembly language can usually beat even the best compiled code);
    3. To do things that can't be written in C such as direct stack manipulation, critical instruction sequences, and special instructions.

    Most C compilers support functions and code fragments written as "inline" assembly.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-