Main Menu
Home
AVR News
Atmel AVR
AVR Development Tools
Valuable Tools
WinAVR toolset
Makefile for WinAVR
AVR Virtual Simulators
Hardware for prototyping
GCC and AVR-GCC
Short introduction to C
AVR-GCC Tutorial
Example AVR Projects
AVR-GCC articles
WinAVR Site Map
Scienceprog FORUM
ScienceProg BLOG
Disclaimer
WinARM Tutorial
Login Form





Lost Password?
No account yet? Register
Latest comments
Measuring motor speed and...
Dear Administrator The code above...
More...

Programming AVR ADC module...
hi please send me example usart with...
More...

Measuring motor speed and...
main.c: In function...
More...

Running TX433 and RX433 RF...
(Hopefully this is not a re-post). I am...
More...

Running TX433 and RX433 RF...
I just bnought a pair of the RX/TX 433...
More...

Syndicate
Friendly sites

Related Items:

Recommended sites


Latest News
Why C instead ASM PDF Print E-mail
Written by Administrator   
Wednesday, 09 August 2006

Why C instead ASM

ASM is a specific language as it is a low level programming language. It is mnemonics to a mashine codes. It takes tons of time to develop embedded programs in ASM language. Now even 8 bit microcontrollers are more capable as they were earlier. The program memories are going up to megabyte(s). Programs becoming more complex, functionality grows up. This is one reason to use higher level programming languages like C.

If using C language you do not have to go into details how processor works. You don't have to think about hardware logic. It is better to leave this work to C compiler which may help you to avoid bugs in silicon level.

Another C language benefit against ASM language is portability. If you work on one embedded system architecture and decide to move to other maybe more advanced. But if your previous program were written in ASM language, then you will have to rewrite this code from beginning. Using C language you can compile program for different microcontrollers without significant modifications of code. This way you new project code upgrade becomes ease.

When using C or other high level language it is easy to save specific hardware routines to libraries which are convenient to reuse in other projects. Using C libraries ensure that your application can be recompiled for different MCU's.

The most important benefit of using high level programming language like C is that you can focus on algorithm design and spend less time on implementing. C is a high level language. It enables to write, understand and maintain embedded programs faster and easier as one C language line can stand for several ASM lines.

ASM language can also be used in critical parts of algorithms, but again C compilers are improving and sometimes program written in C may be more efficient then written in ASM. It depends more on developer than a programming language.

 


Related Items:

   

Users' Comments  
 

Average user rating

 


Add your comment
Only registered users can comment an article. Please login or register.

No comment posted



mXcomment 1.0.6 © 2007-2008 - visualclinic.fr
License Creative Commons - Some rights reserved
< Prev

© 2008 WinAVR AVR-GCC Tutorial
Joomla! is Free Software released under the GNU/GPL License.