Microcontroller Platforms

General Considerations

Speed

These days it's difficult to find a microcontroller (micro, MCU) with less than 8MHz clock speed. This is adequate for simple applications. For instance, given a 100Hz software control loop speed and a 10MHz clock speed, we have about 100k CPU instructions available per loop. However, this can be quickly consumed if clean, abstracted hardware drivers are implemented, or if a simple RTOS is used due to task switching overhead. Since we get speed increases for free (via sampled chips) it doesn't cost anything to spec a higher speed (25MHz or greater) micro.

Logic Level

Two options are available: 3.3V or 5V. While there are a number of 3.3V-compatible chips on the market these days, it's typically more convenient to deal with 5V systems. This isn't a hard constraint - just something to keep in mind when we're spec'ing a processor and peripheral chips.

Flash

Micros include some amount of built-in flash memory for program space - anywhere from 2k up to 256k or more. It is easy to fill up 4-8k of program space with just on-chip hardware drivers if they're done right, and a lightweight RTOS takes a similar memory footprint. We don't want to find out, a few weeks before the project is due, that we have to re-write, strp down or otherwise modify previously-developed application or driver code to make last minute changes fit. Somewhere in the 32-64k range would be appropriate. It's also important to consider the memory architecutre - paged memory schemes, while usually supported in the IDE, can be difficult to deal with and debug.

RAM

This is probably the most critical constraint in embedded systems. If we end up managing dynamically allocated arrays, or implementing some simple RTOS, RAM can quickly get eaten up. For instance, just maintaining a map with walls, floodfill values and overhead may take 1-2k (if we're not using fancy bitpacking and optimizing instead for execution speed). So 4k of RAM would be too small - we'd want at least 8-16k available. Again, overkill is good since it doesn't cost us anything.

Peripherals

It's important when looking for a development platform to define the required hardware resources ahead of time. Typical micro on-chip peripherals include:

  • Analog/Digital converter (ADC)
  • Timer hardware (PWM, capture/compare, clock managers)
  • Asynchronous serial communications interface (SCI) for RS-232 or similar
  • Synchronous (clocked) serial (I2C? or SPI)*External parallel interface
  • Interrupt managers

If we decide to use some sort of radio communications for debug, we're going to need a spare SCI port. If we need an external intelligent motor driver, DAC, or battery charger IC, we'd likely need either SPI or IIC depending on the chip manufacturer. Lots of ADC channels are good, since generally one per sensor is required; resolution is also critical as we don't want to throw away good data just because we have an 8-bit ADC. The timing hardware implementation is also critical - most can do PWM, but not all can do four channels of synchronized PWM. Bonus points if the timer hardware implements quadrature decoder hardware, since this is usally a difficult interface to design. This isn't common, so we'll probably end up with an external quadrature decoder chip which usually implement (5V) parallel interfaces.

Analog Devices

  • Blackfin
    Analog makes digital signal processors (DSPs) along with development kits and an IDE. Their Blackfin processor integrates common micro peripherals but runs uC-linux with a complete host of hardware drivers already done. This is a very heavyweight avenue to pursue, but it should be considered since we're then abstracted from most hardware-level issues entirely.

Atmel

Atmel has a few product families:

Freescale (formerly Motorola)

Motorola has a number of product families from 8-32bit

  • HCS08
    An 8-bit microcontroller with a number of peripherals and very low power consumption. But we don't really care about the micro's consumption since motors and sensors combined are magnitudes higher anyway.
  • HCS12
    A mature 16-bit product family with tons of peripheral and packaging options.
  • Power-PC
    PowerPC-based 32-bit processors with tons of I/O, but only available in BGA packages.

Texas Instruments

  • MSP430
    A 16-bit micro with a great architecture, allowing clean code and logical driver implementations. It's 3.3V only though, and in-circuit-debugging is expensive.
  • TMS320 DSP
    TI offers a few DSP's with a range of performance but not a lot of peripheral options. The TMS320F2xxx series is their DSP/micro hyprid family that integrates most useful peripherals.

<< Back