What Microcontroller Families Are Used In These Tutorials?


To give a bit of an overview of the different flavors of microcontrollers available, this tutorial will be written around one 8-bit family (the Atmel AVR) and one 32-bit family (the ARM Cortex M3 architecture in the form of the STM32 family). These two families were chosen to give a fairly broad picture of the devices and approaches found in the world of microcontrollers. The first few software examples will be written in assembly language for each of these families, as well as in C.  After that, examples will only be written in C.

WHAT ELSE IS REQUIRED FOR THESE TUTORIALS?

While you could, I suppose, work through much of this tutorial using just a microcontroller simulator, I strongly recommend that you have either a microcontroller training/development board, or even just a bare μC chip, assorted components and a powered breadboard. In addition you will need a C compiler that targets your device, and optionally an assembler for your device. You should have no trouble finding a free assembler for your chip, and you should also be able to find a free C compiler, even if it is a reduced-functionality version of a commercial compiler. You will also need a method of downloading your programs into your μC. The details of this download process will depend intimately on the particular μC and board it is mounted on.

As far as test equipment goes, digital multimeters are really cheap, and there’s no excuse not to have one.  Places like Harbor Freight sometimes have them on sale for a few dollars.  The other piece of equipment that any embedded engineer must have is a decent oscilloscope.  Don’t panic, a scope is not required for these tutorials.  However, if you can get ahold of one, you will learn more and save yourself a fair amount of time in the bargain.  USB scopes give good bang for the buck, as do some import scopes (or, of course, a working used scope).  At the end of last year I treated myself to a beautiful Agilent scope with a huge (to me) screen, and every time I use it I’m glad I spent the money.

Regarding the microcontrollers used in these tutorials, here are the details of the hardware and I will be using for each of the processor families:

AVR

·         Hardware: Atmel STK-500 board with ATmega8515 installed

·         Tools: Atmel Studio 6 (free)

ARM Cortex M3

·         Hardware: STM32VLDiscovery Board, mounted on a custom docking board

·         Tools: Rowley Crossworks ($150 for personal license – suggest IAR Embedded Workbench Kickstart Edition for free toolset)

WHICH PROGRAMMING LANGUAGE?

This is a good time to talk a bit about the various programming languages that one can use to write embedded software. The two languages I will use in this tutorial are C and assembly language. The first thing I want to point out is that these are not the only two languages available to embedded programmers, and that in many cases other languages may be a better choice. That being said, both C and assembly language are useful not only for learning about μC programming, but also for actually doing productive μC programming. They are also ubiquitous in that no matter what microcontroller you choose, it will almost certainly have available both an assembler (for processing assembly language source code) and a C compiler (for processing C source code). The same is definitely not the case for other languages. But I would encourage you to consider other languages if you are so inclined and, big IF, if they are available for your device family.

On the subject of assembly language, even if you don’t plan on using assembly language in your embedded programming, I would strongly suggest that you become at least somewhat familiar with the concepts, and with the instruction set of your μC. The reason for this is that, even if you don’t end up writing any assembly language (I hardly ever do any more), you will find yourself at some point needing to examine the output of your compiler and/or your compiler-supplied startup files written or output in assembly language.

Also note that the term “assembly language” will often be shortened, in this tutorial and elsewhere, to “asm” or “ASM.”

Related Posts

© 2024 Electronics Engineering - Theme by WPEnjoy · Powered by WordPress