This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

assembly vs c language

which language is best assembly or c language for micro controller programing, if c is best, why microchip is still standing with assembly language. whether assembly language is convenient language for writing ARM 7, ARM 9 and while going for high end processors.

Parents
  • C is good for application code, which may be migrated from one controller to other controller (will happen when controller can no longer serve the high end needs of the design or if the controller becomes obsolete).
    Some times assembly is used, when there are constraints of time or size of memory.

    Higher languages save a lot of time, if the code is migrated from controller to controller (this platform independent implementation characteristic of higher languages are the reason for faster technological advancement of products such as mobile phones, tabs, PCs, etc)
    But higher languages may add a lot of over head code.
    Using assembly, a time saving-memory saving code can be generated (the smart compilers also help in achieving this, but to some extent). Biggest disadvantage is migration. Re-write the whole code as per the new controllers assembly instructions.

    Thus, people often write a code in basic two parts - device driver & API
    The device driver code may have assembly but the API is generally built in higher language.

    API is migrated, and device-drivers may be re-written.

    There are no Written Rules. The ultimate choice is of the design engineer.

Reply
  • C is good for application code, which may be migrated from one controller to other controller (will happen when controller can no longer serve the high end needs of the design or if the controller becomes obsolete).
    Some times assembly is used, when there are constraints of time or size of memory.

    Higher languages save a lot of time, if the code is migrated from controller to controller (this platform independent implementation characteristic of higher languages are the reason for faster technological advancement of products such as mobile phones, tabs, PCs, etc)
    But higher languages may add a lot of over head code.
    Using assembly, a time saving-memory saving code can be generated (the smart compilers also help in achieving this, but to some extent). Biggest disadvantage is migration. Re-write the whole code as per the new controllers assembly instructions.

    Thus, people often write a code in basic two parts - device driver & API
    The device driver code may have assembly but the API is generally built in higher language.

    API is migrated, and device-drivers may be re-written.

    There are no Written Rules. The ultimate choice is of the design engineer.

Children
  • Thank you so much... what are the micro controllers(or architecture) are essentially used in the industry for mobile phone, camera, tab... is ARM only the choice or some thing else is there as dominant.how best the 8051,PIC are used in the industry.is these two is used in the high end application?,

  • Different devices have different controllers. For that you will have to visit many other forums and check there (because no mobile company will give to the exact details of the part number. they only give details of the architecture/core).

    You can also search the respective manufactures' sites. They (may) have categorized the controllers as per the applications.

  • is ARM only the choice or some thing else is there as dominant.how best the 8051,PIC are used in the industry.is these two is used in the high end application

    there are 'popular' controllers e.g. ARM, but you will run into apps where a less popular architecture MUST be used. Typically that will be because the chip has some unique feature e.g. IR has some "washing machine contollers" with a micro as part of the chip. Also, some companies have a preference becuse of some existing code.

    Now, after several yers of experience, you will be able to 'pick up' another architecture without too much trouble, but do not expect any kind of training to get you there, experience is the only way. Many college students get surprised when they find out that graduation is the day the learning BEGINS.

    Erik