By leaving no aspect of a design in the realm of procrastination, selecting the correct microcontroller involves a few simple reflective steps that will prevent plenty of misery further down the road. A quick recap: The microcontroller is essentially a shrunken CPU compacted into the size of a single microchip. CPU, memory, and I/O are all contained in the microcontroller; it is the heart of any project with electrical components.
Identify all the mandatory hardware interfaces
Make a list of all the required hardware interfaces using a general hardware block diagram, this will give you an idea of the number of pins the microcontroller needs. First list all the communication interfaces to define the total amount of program space the microcontroller will support. These include peripherals such as USB, I2C, SPI, UART, or some form of Ethernet. Next, note the number digital inputs and outputs, analog to digital inputs, PWM’s, etc.
Image courtesy of Bradley.edu
Software architecture depends on processing complexity
Contemplate how much power is needed for the complexity of the algorithms. Will the project use in-depth or light processing? Will the project require software legacy, high fidelity sound recordings, or use high-frequency control loops? Depending on your needs, you may benefit from an 80-MHz DSP or 8 MHz 8051.
8-bit, 16-bit, or 32-bit?
By this point enough information is known to allow you to make a firm decision of whether 8-bit, 16-bit, or 32-bit architecture is right choice. Ensure you’ve left a bit of wiggle room in case future requirements may change; however, be aware of the tendency to over-estimate on the side of greater performance to avoid extra unnecessary costs.
How much RAM?
The advice is opposite for when selecting RAM capacity compared to software architecture. Given the scarcity of RAM on a MCU, discovering your design cannot be completed because it requires an additional 25% memory than available will be a massive inconvenience. While an engineer can estimate the requirements based on the software architecture and peripherals, a less experienced hobbyist may opt for selecting a MCU with external RAM expansion or simply select an MPU with more RAM.
Select a development kit
To actually test microcontroller out, one must purchase a development kit that integrates it. A little bit of research will reveal the best options – development kits are cheap and typically cost under $100 unless they are as specialized as the UDOO or the Mojo. Make sure there are options available for the MCU of your choice.
This SAM3U MCU is integrated into a development kit, image courtesy of Digi-key
Examine microcontroller suppliers stock
Browse the stock of various suppliers or distributors, and compare their cost. Find out the least expensive options that correctly fulfill the power constraints of your design. If purchasing a few parts for a low-volume endeavor consider multiple distributers. Alternatively, bear in mind that high-volume purchases are influenced by a number of outside factors: the availability of stock and the duration of lead-time.
Compare your time constraints versus the shipping duration to avoid wasting weeks or months waiting for parts. Furthermore, it’s worth ensuring availability of the parts will remain constant over the lifetime of the project.
Programming language, compiler, and debugging tools
Lastly, determine what programming language can be used with your microcontroller and what compilers and debugging tools are available.
Visit TechXchange if you’ve any additional questions about selecting an MCU for your design.
Learn more about Digi-Key