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.

electronic6000

Junior Member level 1
Joined
Apr 5, 2005
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
IRAN-MIANE
Activity points
1,413
hi
i'm beginner in mcu and work alot with asm
but i want know c better for mcu programming or asm
in Big project
 

Asm or C ???

Hey
asm is good in initial stages as it gives a chance to understand the processor better but for large projects my vote is for 'C' as the purpose is different.

Regards
tronix
 

Re: Asm or C ???

For small home project I prefer ASM but for professional development C i better. C programs are ease to debug and upgrade.
 

Asm or C ???

I'll quote one of my friends and mentors: "If somebody working for you writes in assembly - fire him to keep your own job."

Assembly is for machines to execute. C is for programmers to write and read. Who do you care about more: machines or people? I personally care about people (myself included).

EDIT: I forgot to mention that the suicide rate among the programmers have dropped significantly, when the high-level languges (Algol, COBOL, C etc) were introduced.
 

Re: Asm or C ???

Hi

Mixing both in right combination for code efficiency and speed is key to success.

I use in line asm whenever i need to compress the code and speed up.

Nandhu
 

Re: Asm or C ???

Agree with you nandhu015, mix combination is better, and how to mix is depending programmer's skill and which project he is doing, there is no the same "formula" for everyone. Assembly is difficult to write, but it has all of tools for easing writing and managing codes, using well assembly is a kind of art.

nguyennam
 

Re: Asm or C ???

hi,
for me asm and c are good ways to do all the project included yours. i think u have to use which one u like and u know clearly about it .
 

Re: Asm or C ???

Hi,
Programming in C is much easy and go faster for developping (one line for using a serial port in c, several in asm) but when your space memory or ressources are low or when you need a specific timing for signals, you must use asm.
Bye
 

Re: Asm or C ???

asm is good in initial stages as it gives a chance to understand the processor better but for large projects my vote is for 'C' as the purpose is different.
 

Asm or C ???

For most projects C is much better.

And with bigger and faster microcontrollers entering the market, using ASM is becoming more time consuming.
 

Re: Asm or C ???

Both assambler and C language have a purpose .Usually assambler is useful for speed ..you can really write a much faster code than a compiler provided that the section of code is small .Also in some application where you want to optomize space assambler is once more the way to go.This day cpus come with a lot of flash and ram so it seems that C is widely used ..
 

Re: Asm or C ???

they are right
Assembly is harder.
and in most of the new PICs, they are using C.
but personally i like to write in assembly, it depends on u
Asm and C are both Excellent
 

Asm or C ???

C IS BETTER THEN ASM IN THE WAY WE WRITE THE PROGRAM. BUT C ALSO WILL MAKE YOUR SIZE OF PROGRAM LARGER THEN ASM. SO DEPENT ON YOU TO CHOOSE BECAUSE C OR ASM HAVE PRO AND CONTRA..
 

Asm or C ???

I think C is using for complicated project. although ASM is faster than C but just now many MCU can operate at high speed.

It is better to use both(ASM and C). Using C for main program and using ASM for subprogram (only high speed).
 

Re: Asm or C ???

I did almost 3 years then i shifted to the C ......... it is good initially u do coding in ASM
 

Re: Asm or C ???

The faster to ejecute is ASM
The faster to develop is C (PCWH CCS)

The most complicate to learn is ASM
The most easy to found a problem is ASM

I prefer make in C and debug in ASM. :lol:
 

Re: Asm or C ???

hi all
have any web ste who teach c or asm language
please send me the link
 

Asm or C ???

here is the deal.
If you are programming something that requires a very quick response time, use Assembly (for example in a crash detector of a car to deploy the airbag)
But if you are writing code for a washing machine, use C.
 

Re: Asm or C ???

jasonhaykin said:
If you are programming something that requires a very quick response time, use Assembly (for example in a crash detector of a car to deploy the airbag)
I doubt that even the airbag sensor requires Assembly code. Airbag has to trigger in hundreds of microseconds, which is well within the capabilities of the C code running in the interrupt service routine.
 

Re: Asm or C ???

For those who want to learn C for PIC mcu they could try following link:
https://www.mikroe.com/en/
excellent material for their C for PIC mcu.
for CCS their website could also be checked.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top