Embedded Systems : Part 2
The eternal debate : Microprocessor vs Micro-controller
In any embedded systems requiring sufficient computing , designers and customers are always divided about choosing between microcontrollers and microprocessors. In this article I hope to create a framework to evaluate the design constraints and naturally evolve to the solution.
This is probably an easy decider. Microprocessor systems cost more as they have to incorporate a minimum of processor, RAM and Flash along-with suitable Power supplies. Depending on your processor choice this could vary between tens of dollars to hundreds of dollars. If your BOM budget is low , go with a microcontroller else read on.
2. Do you need multiple independent software to run on the system ?
This is probably also easy. Microcontrollers have firmware which is a binary image of the software bundle. Most of the time the different functionalities are all bundled in the same firmware, requiring an upgrade of the entire firmware if you had to modify a single component. Microprocessors on the other hand run an Operating system ( Courtesy their Memory Management Unit ) and thus can upgrade selectively. If you want simplicity of software development choose microprocessor.
3. Do you need a lot of computing power ?
领英推荐
Computing power is measured in MIPS ( or Millions of Instructions Per Second ). For a typical microcontroller the number ranges from 10-100+ depending on its cost and complexity. Microprocessors on the other hand execute in TFLOPS ( Trillion Floating point instructions per second ), a decent micro processor will have this number between 0.1 - 1+ which is a huge computing power jump. Now arises another question , do you really need a floating / fixed point unit ? If you are doing say image processing , the answer is yes but for most embedded workloads the answer is a resounding no! Most embedded application do logical and arithmetic operations and that is sufficient. Even motor control can be achieved without a FPU. So estimate the compute requirement of your software and select accordingly.
4. Do you want a low power device?
Power consumption is an important factor in system design. For very obvious reasons you want the lowest possible power consumption. This becomes all the more critical for battery based systems. Microcontrollers a very power efficient due to their very common RISC architecture with predictable times for a certain code execution. Microprocessors on the other hand prevalently have a CISC architecture which makes it difficult to predict execution time and thus power. If you need predictability of power choose microcontrollers else otherwise.
5. Is it a safety critical device ?
Many embedded systems control our surroundings and any fault in them could be life threatening. Most common example being an automobile, if there happens to be a crash the airbags need to be deployed within a few milliseconds otherwise it will lead to a loss of life. In such safety critical devices microcontollers are mostly used due to the simply fact that execution time is predictable and can be ensured at design time.
The above should help you in deciding between a microprocessor and a micro-controller and if in doubt please reach out to me.