??? 03/05/09 16:45 Read: times |
#163099 - Programming µControllers Responding to: ???'s previous message |
Hi Pan,
Erik and Andy have both given you good advice. It's too late to implement Erik's advice in this project, but it's not to late to have learned the lesson. To Andy's advice I would add the caveat that while learning C on a personal computer you should take great care to recognize and understand the difference between C (i.e. ANSI C) and C++. I believe the literature Andy pointed you to is about C, not C++, but that may not be true of other resources you come across. In the end you're very apt to end up learning something about C++ only to later be confused as to why your perfectly good C code won't compile for use on your µController. Now for my own advice. You may want to learn C, and that's a good thing. But if you haven't done so already, I strongly recommend that you first learn Assembly. As you advance into more complex applications the abstractions and flexibility of a high level language will be quite valuable. For very complex applications a high level language is the best tool for the job. But writing code directly at the hardware level will give you a level of understanding that the higher level language intentionally obfuscates. Even when you write most of your code in C, there will be times that, for one reason or another, writing your code in assembler will be the better choice. Knowing how will not only give you that choice, it will also give you the advantage of knowing when it is (or is not) the better choice. In short, neither approach is always the better choice. You need to be prepared to use either, and to know when. Joe P.S. If you really want to learn something about programming a µController, write a simple little (short) "Hello World" program in assembler, and then assemble it yourself. You'll be amazed how much insight you get into the hardware. |
Topic | Author | Date |
About my project | 01/01/70 00:00 | |
a very basic mistake | 01/01/70 00:00 | |
RE: I have no idea about the program. | 01/01/70 00:00 | |
Programming µControllers | 01/01/70 00:00 | |
Language is an implementation issue | 01/01/70 00:00 | |
This is not a chicken and egg question | 01/01/70 00:00 | |
Reply | 01/01/70 00:00 | |
another basic mistake | 01/01/70 00:00 | |
SHARP GP2D12(Distance Measuring Sensor)![]() | 01/01/70 00:00 |