Necessary to know C perfectly for uC programming?

Guest #1951926
Rate this post
useful
not useful
Hi guys,
I was wondering if one needs to know almost everything about ANSI-C in 
order to program a microcontroller (consider the fact that I don't want 
to learn Assembler). To explain my point:

I would like to learn C++ because of its OOP. But I also would like to 
get some expierences in programming microcontrollers. From what I have 
seen in uC programming it is (very) important (programming in C) to
- know the bit manipulation for registers
- write and use functions (to make the program clear)
- know about the variables (int, double...)

This is what I used when I programmed a uC a few years ago 
(unfortunately I don't remember much of it so I have to start again 
dealing with that subject).

In my opinion - please correct me if I am wrong - it is not a big part 
to learn.

Okay, to close the circle:
I would like to learn C++ to know it almost by heart and to learn the 
topics mentioned above in order to know how to program a uC.

My question to you is quite easy:
Do you agree with my plan or am I going to do a big mistake with it?

Thank you very much for every answer (and there is no wrong answer; I 
beg your honest opinion about that).

Best regards
al3ko
Guest #1951975
Rate this post
useful
not useful
You certainly don't need to know C by heart to programm a 
microcontroller. I think learning-by-doing is best. Just start by 
modifying good programms, then write your own.

After some time, you'll realize that you won't get any further with your 
current knowledge. Then you can just look up the bits you need in a 
C/C++ book.

C/C++ on a µC is quite a different thing than on a full blown computer. 
They still have a common part, but you won't need f.e. the whole 
input/output stuff an a µC. So it makes no sense to learn this just to 
programm a mikrocontroller. On the other hand, debugging on a computer 
ist quite easy. Just do both in parallel, you can't unlearn things ;)

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now