Communiqué
How to Choose the Best Microcontroller

How to Choose the Best Microcontroller

MicrocontrollerImage courtesy of Thinkstock

I am in the process of updating my book "Electronics Explained," published by Newnes/Elsevier. The book is essentially a basic electronics text for those learning about electronics for the first time. In this second edition I am adding more hands-on projects and greater coverage of microcontrollers and software. Since virtually all electronic products contain a microcontroller today,  embedded controllers have become part of learning electronic fundamentals.

Now I’m in the process of trying to decide which microcontroller to use as an example. In the current book chapter I cover microcontrollers by explaining a generic micro, using a block diagram and some simple examples of assembler code. I want to expand that to cover a popular 8-bit microcontroller with some software examples. The main questions I have are which microcontroller to use, and which programming language to give as an example. I would appreciate your thoughts and inputs.

I do have some personal experience with microcontrollers. I initially learned on the 8080 and 6800 microprocessors, followed by some coding with an 8051. While I was teaching at a local college, I taught the 68HC11 using assembly language. I know that the 8051 is still available in various enhanced forms, so perhaps this is still a good choice for the book (although I think the 68HC11 may be too dated to use).

There are lots of choices. I want something simple—probably an 8-bit microcontroller, although a 16-bit device would be acceptable. I am considering one of the PIC devices and the MPS430, as well as the Atmel device used in the popular Arduino micro. What else should I be looking at?

The ARM processors are very popular today and I probably should give them some consideration. However, these sophisticated devices are probably overkill for a basic introduction to microcontrollers. Then again, maybe not. I welcome any comments on this point.

Here are my criteria for selecting a processor:

  1. Simple architecture and easy to learn.
  2. Currently being used in modern designs.
  3. The availability of an evaluation module or an applications board.
  4. Something individual hobbyists and experimenters can buy.
  5. Inexpensive.
  6. Free or cheap software.

This last item brings up another key question: What programming language should I use for basic examples in programming? I have the tendency to want to include assembly language, but it is probably not the primary programming language for microcontrollers today. On the other hand, I am hesitant to include more advanced programming languages like C. What other software is commonly available for the simple microcontrollers available today? Most likely it is C, but perhaps there is another language I  should consider. Python, perhaps?  I have had some experience with the Parallax BASIC Stamp microcontroller modules. They use a simplified version of BASIC called PBASIC. It is fast and simple to learn and works great. I have built a number of personal projects using these microcontrollers and BASIC. I am tempted to include this as an example, though I doubt that BASIC is widely used in new product development today.

One of the most popular microcomputers used in teaching basic programming is the Arduino, which is based on an Atmel microcontroller and a version of C. The Arduino is inexpensive and widely available and otherwise meets all of my criteria. Having to learn the C language may be an obstacle, though.

Another widely available microcontroller is the Raspberry Pi. It is a complete computer using an ARM processor. I’m not sure this is a good choice for teaching microcontroller fundamentals as it is far more complex, and an operating system like Linux is probably necessary.  All I have space for is two chapters.

Anyway, I am doing some research and considering my options right now. I thought it would be interesting to see what you experienced designers have to say about this. For example, if you had to teach basic microcontroller fundamentals and programming fundamentals to someone, which device and language would you choose? I am looking forward to hearing some of your suggestions. Thanks in advance for your input.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish