Microcontroller Design Checklist

Or,

My Top Seven uController Issues

This is my checklist that I use when approaching a new embedded system project using a uController. Its not complete and I add to it whenever I think of new things. There are 3 major goals for this checklist:

I group things into 7 key issues:

All hardware and software projects should include a requirements analysis, user interface evaluation, documentation, etc. etc. This is not intended to replace all that - just highlight some of the special microcontroller issues we face.

1.0 The "Data Path"

Borrowed from hardware design lingo; the "Data Path" refers to how the microcontroller does its math and data handling. A small PIC 16C54 microcontroller, for example, has an 8-bit data path and is capable of directly doing 8-bit ADDs and SUBs but not Multiplies or Divides. Larger widths can always be accomplished in software, but at the expense of memory and speed.

List any major "functions" or computations. This is NOT a list of all the functions of the program, but rather specific data functions such as a FIR filter, or 'Interpolate PWM Table Values'. Many applications may not need this sort of list (e.g. the Elevator or Traffic Light Controller really does not do any elaborate math functions beyond just adding and subtracting).

2.0 The "Control Path"

Again, borrowed from hardware design lingo; the "Control Path" is the firmware portion that creates the sequence of actions and provides the decision making. State Machines, Rules, etc. make up the control path. Try to establish a sense of how many states, modes, rules, etc. the program needs. Compile some code examples and count the memory and cycles required to do, say, a state machine with 6 states using an 8-bit state variable. You may be surprised! List control variables in the same manner that data variables were cataloged.

List all your major program functions. This is just the outlining of software and not unique to microcontrollers, so I won't say any more.

3.0 Memory

The analysis done above in sections 1.0 and 2.0 naturally provides an estimate of memory requirements. You should be keeping a column of "words required" for all variables. The total memory required is, of course, always an art of estimation. Judge the risk of choosing too small a memory footprint against the need for room to grow and cost of unused memory. Optimally, pick a microcontroller family with a range of memory sizes within identical packages.

4.0 Real-Time

Firmware projects usually have real-time requirements. Some requirements are more stringent than others. Performing the debounce delay for a keypad switch is a much easier real-time contraint than is measuring the frequency of an audio input signal. Some real-time requirements will require simple software tricks while others will require dedicated hardware solutions. Do not confuse this list of real-time "tasks" with general firmware tasks. The key words here are real-time. Also note that I am not refering to a RTOS "task" (BTW: my personal experience has been that I implement my designs in a very state-based manner and have rarely felt the need for a RTOS).

5.0 Persistence

Undetected persistence requirements can be a real show-stopper and wreck a project if discovered too late. Persistent variables (or "non-volatile" variables) keep their values even if the box is turned off and on again. For example, your unit may have a network address, some operating parameters, event counters, etc.

The list above will detirmine how much persistence storage is required (e.g. 4 bytes or 4 Kbytes). The number of times any variable changes may detirmine the hardware implementation, for example, most EEPROM memories only allow about 100,000 writes. If you must maintain a persistent variable that changes very, very fast or frequently and is therefore inappropriate for EEPROM or FLASH, then you may have to consider alternatives like battery-backed SRAM, Power Fail Detect or EEPROM with "shadow ram". Some microcontrollers conveniently include some EEPROM. If not, some traditional semiconductor companies offering non-volative memory include; XICOR (EEPROM, EEPROM with "shadow SRAM"), Dallas Semiconductor (Battery-backed SRAM), AMD (FLASH) and ATMEL (FLASH and EEPROM).

The bottom line is to consider persistence very, very carefully.

6.0 Tools/Development

Here are some key points and ideas:

7.0 Chips and Board

Again, here are some miscellanious checklist items.


Back to Tom Coonan's Main Page