boardtestingpromo.gif
boardtestingpromo.gif
boardtestingpromo.gif
boardtestingpromo.gif
boardtestingpromo.gif

How to Choose the Best Microcontroller

July 18, 2016
Electronic Design's own Lou Frenzel is updating one of his textbooks—and is soliciting advice from readers on microcontroller content to include.
Image 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.

Sponsored Recommendations

Article: Meeting the challenges of power conversion in e-bikes

March 18, 2024
Managing electrical noise in a compact and lightweight vehicle is a perpetual obstacle

Power modules provide high-efficiency conversion between 400V and 800V systems for electric vehicles

March 18, 2024
Porsche, Hyundai and GMC all are converting 400 – 800V today in very different ways. Learn more about how power modules stack up to these discrete designs.

Bidirectional power for EVs: The practical and creative opportunities using power modules

March 18, 2024
Bidirectional power modules enable vehicle-to-grid energy flow and other imaginative power opportunities. Learn more about Vicor power modules for EVs

Article: Tesla commits to 48V automotive electrics

March 18, 2024
48V is soon to be the new 12V according to Tesla. Size and weight reduction and enhanced power efficiency are a few of the benefits.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!