What is a Microcontroller?
A microcontroller is an electronic system of a single chip that is programmed with specific task to be performed on an electronic system. The grouping is mainly designed to regulate and oversee the usage of the embedded systems.
Elements of a Microcontroller
It is made up of CPU, non-volatile, or permanent memory, volatile, or flammable memory, others such as timers, I/O, interrupts, and supporting circuits among others.
Central Processing Unit
The CPU is involved in arithmetic functioning, data control and production of control signals in relation to the sequences in instructions that are produced by the programmer.
The complex wiring pattern essential in the execution of the CPU is not in the designer’s view.
However it is possible to write code for these microcontrollers and this is because modern development tools like integrated development environment and high level languages such as C make it a simple task to write code for microcontrollers.
Memory
This program is saved in a form of data called nonvolatile memory which is affordable and is exclusively used by the microcontroller; it lists all the machine language code – which can be a very long list indeed – that gives the CPU specific instructions.
Temporary storage of data is done through volatile memory also referred to as RAM.
This data is lost when the microcontroller loses power, meaning that this is not a long term solution.
Internal registers also serve as storage of data in the mean time but they are not considered as a different functional unit in the case of CPU as these are incorporated into the CPU.
Peripherals
The term peripheral is used here to define the hardware modules in a microcontroller that assist the microcontroller in its interface with the outer system. The list below outlines the prospects of the peripherals’ differentiation and offer examples of the corresponding classes:
Data converters: There are three main components for a typical digital converter: Analog-to-Digital Converter, Digital-to-Analog Converter and Reference Voltage Generator.
Clock generation: Internal Oscillator, Crystal Drive Circuitry, Phase-locked loop.
Timing: multifunction timer such as general-purpose, real-time clock, external-event counter, pulse-width modulation.
Analog signal processing: The operational amplifier is an analog comparator.
Input/output: general-input / output digital circuits, memory interfaces of the parallel type.
Serial communication: UART, SPI, I2C and USB.
Support Circuitry
To this class belong those functional blocks, which cannot be considered as peripherals since their main function is not to interact with outside hardware entities and their signals.
They are, however, very significant - they facilitate the internal workings of the device, make implementation easier and enhance the development process.
Debug circuitry enables the designer to keep track of not only what the microcontroller is doing, but is also doing as it executes instructions.
It is an essential and, sometimes, the only way of searching for and identifying bugs, as well as optimizing firmware performance.
Disruptions are possibly the most essential characteristic offered by microcontroller operation.
They are asynchronous signals from the outside world or from special sub-systems of the computer and compel the processor to handle these signals and perform a set of instructions.
A clock-generation module can be called a peripheral if it is aimed at creating outputs that will be utilized in other parts of the system, outside the chip; however, many of the microcontroller internal oscillators’ primary purposes are to supply CPU and peripherals with requisite clock signals.
Internal oscillators generally do not have high accuracies but for the applications the low accuracy is acceptable which leads to the overall size of the board being reduced and the complexity of the design.
Microcontrollers can include power-supply circuitry in its number of types.
Integrated voltage regulators also enable on-chip generation of necessary supply voltages, power management modules enable low power consumption during non-operation periods of the device and supervisor modules put the processor to a reliable reset mode whenever the supply voltage is not sufficient for normal operation of the processor.
Difference Between Microprocessor and Microcontroller
Microprocessor vs Microcontroller
Microprocessor | Microcontroller |
---|---|
Because memory & I/O are connected externally, the circuit expands in size. | Because memory & I/O are present together, the internal circuit is compact in size. |
It can’t be utilized in compact systems. | It is suitable for compact systems. |
The cost is huge. | The cost is low. |
It is unsuitable for devices that run on stored power because of the high total power consumption caused by external components. | It can be utilized on devices that rely on stored power because the total power consumption is low due to fewer external components. |
RAM, ROM, I/O devices, & other peripherals are not all on the same chip. | RAM, ROM, CPU, & other peripherals are all integrated on a single chip. |
No power-saving mode. | Implement a power-saving mode. |
Utilized in personal computers. | Employed in embedded systems. |
A lower number of registers. | High number of registers. |
Utilizes an external bus. | Utilizes an internal control bus. |
Developed on the Von Neumann model. | Developed on the Harvard architecture |
It is the central processing unit of a single silicon-based integrated chip. | It is a result of the evolution of microprocessors, which have both a CPU and extra peripherals. |
The enormous quantity of instructions to process makes it complex and expensive. | Because there are fewer instructions to process, things are simpler and less expensive. |
Can run at high speeds. | Can reach up to 200MHz or higher. |
You can also follow us on AutomationForum.co, Facebook and Linkedin to receive daily Instrumentation updates.
You can also follow us on ForumElectrical.com , Facebook and Linkedin to receive daily Electrical updates.