Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What's better for big MCU programming projects, C or ASM?

Status
Not open for further replies.
Re: Asm or C ???

What do you want to program?
 

Re: Asm or C ???

C would be better for portability
 

Re: Asm or C ???

it is easier to develop codes in C language. Assembly instructions may change when you start to work on another microcontroller project. but you can use a C code that u had written before by making a few cahges on it with ur new microcontroller.

but when u need exact timing operations, and when you have memory restrictions assembyl is better i think.
 

Re: Asm or C ???

both are required . asm for hardware and base tasks such as interfacing modules .. and c for programming complex code such as mathematical equation.
but beginners must first learn asm to be acquainted with mcu's hardware.
 

Re: Asm or C ???

C is better.
 

Re: Asm or C ???

Develop the product with "C" and test the entire hardware and functionality. To do so, you may require a "big" microcontroller and don't bother about that. Your product cost may increase by doing so but the big advantage you get is shorter development time.

Later, if you plan for produce the product in large volumes, redesign the code in assembly. Even though it may take much time, it considerably reduces the cost of micro and it gives powerful code (in sense of fast execution).
You have to consider one thing here. The code generated in assembly MUST be thoroughly tested. It may contain unknown bugs (difficult to identify). Using C you may not have these type of problems.

One last thing:
Programming in assembly not only requires the understanding of controller architecture but also requires the command in mathematics, self discipline (in manipulation of variables)and a lot of patience :roll:. You have to continually research and practice the mathematical routines, implementation of control statements etc. Maintaining a library of your code may reduce the development time in assembly language.

These are my opinions only. If I am wrong, please let me know.
Thank you.
 

Re: Asm or C ???

I prefer C, but you can use asm code to optimize in size and speed.

if you are writing in c you can add asm code:

Code:
#include...
...
...

#asm
        ;you write here the asm code
#endasm

// you contiinue with your c code
[/code]
 

Asm or C ???

if ur a beginner it's a must fr u to learn assembly...but as u have finished learning the architecture of the microcontroller i suggest u move on to c...cause as ur project becomes more complecated so does writing codes in assembly.....in the industry today assembly is no longer or hadly used...with the introduction of new and faster microcontrollers today even driver codes are written in c...
 

Re: Asm or C ???

Hi,
both are required, i prefer to develop in C with some sections in asm if required like startup code etc.

thanks
sawaak
 

Asm or C ???

For beginner i will prefer use ASM, if you have the basic in programming, you can move to write in C, by experience i can learn C language faster when i have understand the asm..

If you are a professional you can mix the both
 

Asm or C ???

the asm need you think more about detail
 

Asm or C ???

Optimizing compilers can generate very efficient code.
It can be very instructive (if your compiler allows for generating an assembly listing) to see what kind of code you are generating. With experimentation this can suggest more efficient C code.
The assembly listing can also be manually optimized, in effect using the C compiler as pass one in the design cycle.
 

Asm or C ???

i have assembly and C programming.my opinion is for better compact program used assembly. but after i learn C ,i more like programming in c
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top