hi everyone ,i am trying to learn microcontroller.i want to ask which language would be easier assembly or c. Any advice about where i should start from? What i need to know?
Any response would be helpful.
Programming in C is easier and faster, but if you want to know, what happens inside uC or need to program very accurate timings, then you must know assembly.
A good book for learning is "C the complete reference" by Herbert Schildt.
The advantage of programming assembly is that you know, how it is implemented.
So somtimes it is easier to find bugs then.
In my opinion you first go for assembly language program as it has very keen facilities such as debugging,control over hardware,internal processing etc . for the begineers assembly language is a bit difficult but intresting than high level.As the program size increases it is difficult to program in assembly then you can go for high level such as c,pascal etc.
I guess someone can take the contrary view, I say why add a level of abstraction and make getting at the hardware just that bit trickier. I have seen countless post of c programmers not quite being able to make the micro do what they want. The advice given here is good though, learn assembly first, you are going to need to be familliar with the datasheet of the device you are using anyway so you are half way there. Then learn c if you think you need it.
Regards,
John.
when i learn about avr , i am using C to develop and it's quite easy but if you want learn deeper about it you must learn assembly first, right now i'm learning assembly too, we need it sometime to optimize the avr works.
c is much easier than assembly language.
In C , you need to definr the variables and write the procedures in terms of commands. So, the length of program ios short. While, in Assembly, you havew to write the evrything in terms of codes, so the program becomes too long.
C is easier. but starting with assembly language will give you more understanding towards the concepts of microprocessors.
so better start with assembly language and then migrate to C language.
i would suggest C... but first have to understand the uC architecture first (mayb assembly is a good idea)...
C is a very good investment... first, we all study C in our university time...
further more, once u know C.. u know all (hope this is not exaggerate)... i can learn JAVA, BASIC, PERL, VB, very easily.... even VHDL & verilog (though they r concurrent hardware language)...