Forum: ARM programming with GCC/GNU tools Necessary to know C perfectly for uC programming?

Author: al3ko (Guest)
Posted on:

Rate this post
0 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

Author: Klaus Wachtler (mfgkw)
Posted on:

Rate this post
0 useful
not useful
If you add some knowledge about pointers it sounds like a good plan.

You surely have no need to know everything about C, but you will need
a good understanding of it.

Author: avion23 (Guest)
Posted on:

Rate this post
0 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 ;)

Author: al3ko (Guest)
Posted on:

Rate this post
0 useful
not useful
first of all, thank your for the feedback. I have decided to concentrate 
on C++ (in order to manage one programming language very well) and to 
look up how to programm a uC in C by doing this tutorial

I think it is a good tradeoff between my interests.

Thanks a lot and have a nice weekend.



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.