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
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.
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 ;)
Hey, 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 http://www.mikrocontroller.net/articles/AVR-GCC-Tutorial I think it is a good tradeoff between my interests. Thanks a lot and have a nice weekend. BR
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.