system call diagrams
A BareMetal Image

Microcontroller is a small computer on a single chip used in cases where a fully-fledged system and Operating System (OS) is an overkill. It is similar to system on a chip (SoC) but less sophisticated. Microcontrollers are mainly used in automatically controlled devices like home appliances, toys and other embedded systems. Microprocessors on the other hand are a specific type of processors implemented as a single Integrated Circuit (IC) that acts as the brain of a computer, providing control and and executing instructions. Microprocessors are used in general-purpose computing in personal computers and servers.

Components of microcontrollers and microprocessors

a) Microcontroller

Microcontroller hosts every computing unit needed to complete a task. It therefore has in-built processing unit, memory, and ROM. It also provides for peripherals interfaces to timers , sensors and actuators.

b) Microprocessor

Microprocessor is a processor and therefore has Arithmetic and Logic Unit (ALU), Control Unit (CU) and registers as the main components.

Similarities

Table showing similarities between microcontroller and microprocessor
Basis Explanation
Technology Both uses semiconductor-based integrated circuits.
CPU Both contains the CPU.
Remember modern processors are SoCs bundling many other features together with CPU.
Programming Both are programmable
Timing Both operate based on time signals.

Differences

Table showing differences between microcontroller and microprocessor
Basis Explanation
Integration Microcontroller has CPU, memory modules and IO modules
Microprocessor require external memory and peripherals.
Application Microcontroller used for specific, low power applications like toys and consumer electronics.
Microprocessor used for general purpose, high-performance systems like servers and PCs.
Performance Microcontroller is optimized for efficiency in realtime processing both in memory usage and power consumptions
Microcontroller is adapted to computation-heavy systems mostly over 1GHz
Scale Microcontroller is for small scale processing where usage of microprocessor-based system maybe an overkill and inefficient.
Microprocessor is for large scale processing in general-purpose computers.
Operational Cost Microcontroller has inexpensive hardware and easy to use because of limited functionalities.
Microprocessor is expensive and complex hardware, require specialized skills to configure its systems.
Example usage Microcontrollers-Arduino, STM32, Intel 8051
Microprocessors-Personal Computers, smartphones, Raspberry Pi

In conclusion, microcontroller is a tiny computing unit adapted to a single task (the brain in embedded systems) while microprocessor is a type of processor on a single chip. In this website, we focus more on microcontrollers as used in data collection, sensing, actuating and edge processing.