Home > electronics, programming > How high is too high?

How high is too high?

Hello boys and girls.

A common question I come across quite often, is from a where a beginner should start his/her microcontroller programming adventure. I remember myself wondering exactly the same thing when I was starting out, not too long ago. So which is the best to program? Assembly or C or Basic or… ?

Well I am going to give you my opinion and how well it worked for me. Let’s face it, knowing what is going under the hood is the best experience anyone can get working on any kind of project. If you know exactly how the system works, then you will be able to squeeze every last drop of juice the microcontroller has to offer. Also, it makes you wiser when you try to debug. In short knowing how to program in Assembly makes you the man! Maybe, but not quite! Well you see, the problem is that when you program in Assembly it takes too damn long! Not only that but also the fact the the code becomes quite long in pages it is very easy to get lost if you are not well organized.

And this is where high level languages come in. Personally I never worked with Basic so I going to talk about C. The first time I programmed a PIC program using C, I was shocked when I realized that a program that took me about 2-3 days to write it in ASM, it was up and running within few hours! It was pretty a amazing feeling, I still remember it! In addition to that there are some excellent C packages out there that really allow you to build a project really really fast using their build-in libraries. I have used MikroC from MikroElectronika and I was amazed by their labraries showcase. There is a library for most of the features the PICs have. The libraries allow you to use these features very easily. Personally I am a big fun of the USART (serial comm RS232) library. You can output a “Hello World” with just 2 commands!

To tell you the truth I was never a big fun of losing control over simplicity. I think that something in the middle is the best solution. And this is how I see C. I think is perfect for developing PIC programms because it gives you some low level control but on the same time it allows you to write code so much faster.

I believe that if you are starting out you should take few hard lessons how to program with ASM. Learn how to read and write data, how to use the modules of the microcontroller, learn how to control LCDs and 7 segment displays. It is a bit difficult when you starting out but you will get there. Then after feeling quite confident about your ASM knowledge you could move to C. Try C compare it with ASM and you can (and should) use both! That is my advice.


Related Posts:



Categories: electronics, programming Tags:
  1. No comments yet.
  1. No trackbacks yet.