Difference between Microprocessor and Microcontroller
The introduction of a piece of technology called “Microprocessor” has changed the way in which we view, analyze and control the world surrounding us over the past two decades. The first commercial microprocessor is 4-bit 4004 developed by Intel and was made available in 1971. Since then, it took a phenomenal success in its development and usage. Microprocessor is considered a product of combined developments in the fields of computer architecture and Integrated Circuit (IC) fabrication. It has made the concept of personal computing very feasible.
The Microcontroller is often considered as a byproduct in the development of microprocessor. The fabrication process and programming technique which are responsible in the development of microprocessors has also lead to the development of microcontrollers. Until a decade ago, the microcontrollers are less popular in both the technical community and general public even though most of the consumer electronics like televisions, video games, video cassette recorders, telephones, elevators etc. comprise of them.
Before going to the differences between microprocessor and microcontroller or tabulating microcontroller vs. microprocessor, let’s see the brief introduction of microprocessor and microcontroller.
A Microprocessor, popularly known as “computer on a chip” in its early days, is a general purpose central processing unit (CPU) fabricated on a single integrated circuit (IC) and is a complete digital computer (later microcontroller is considered to be more accurate form of complete computer). It is a small but very powerful electronic brain that operates at a blistering speed and is often used to carry out instructions of a computer program in order to perform arithmetic and logical operations, storing the data, system control, input / output operations etc. as per the instructions. The key term in the definition of a microprocessor is “general purpose”. It means that, with the help of a microprocessor, one can build a simple system or a large and complex machine around it with a few extra components as per the application. The main task of a microprocessor is to accept data as input from input devices then process this data according to the instructions and provide the result of these instructions as output through output devices. Microprocessor is an example of sequential logic device as it has memory internally and uses it to store instructions.
The first commercial Microprocessor was released by Intel in year 1971 November named as 4004 (four – thousand – four). It is 4-bit microprocessor.
There are five important components in a microprocessor. They are Arithmetic and Logic Unit (ALU), Control Unit, Registers, Instruction Decoder and Data Bus but the first three are considered significant components. The block diagram of a microprocessor with these basic components is shown below.
The internal structure of a microprocessor is shown below.
Earlier microprocessors made use of Von Neumann architecture where the data and instructions (programs) are stored in the same memory. Even though this architecture is simple, there are many draw backs. One of the major drawbacks is that instruction and data cannot be accessed at the same time as they share a single data bus. This often degrades the overall performance of the device. Later, Harvard architecture is introduced which makes use of separate program and data memories with separate buses so that both data and instructions can be accessed at the same time. Later Modified Harvard Architecture is developed in which the program memory is accessed as if it were data memory.
There are three basic characteristics used to differentiate microprocessors. They are instruction set, bandwidth and clock speed. Instruction set is related to programming of the microprocessor which mainly consists of instructions that a microprocessor can execute. Bandwidth indicates maximum number of bits processed in a single instruction. Clock speed gives no. of instructions a processor can execute per second. Usually clock speed is in MHz (Mega Hertz) or GHz (Giga Hertz). Generally the characteristics bandwidth and clock speed are looked together. The higher the values of both these characteristics, the more powerful the processor is.
Instruction set or instruction set architecture (ISA) also plays an important role in the design and functioning of a processor. Microprocessors are classified as either CISC (Complex Instruction Set Computer) or RISC (Reduced Instruction Set Computer).
CISC architecture consists of full set of instructions that are complex, larger, have more computational power and so on. A single CISC instruction can be used to execute several low-level operations, multi-step operations and multiple addressing modes. The execution time of these instructions is long. Intel’s X86 is an example of CISC architecture.
RISC architecture was developed by realizing that instead of using full set of instructions, only the frequently used instructions are sufficient. In this architecture, the instructions are small and highly optimized. RISC processors are used where execution time of the instruction should be less and cost of development is less. The ARM devices are based on ARM architecture which is a subset of RISC.
The main reason for the development of microcontroller is to overcome the only drawback of the microprocessor. Even though microprocessors are powerful devices, they require external chips like RAM, ROM, Input / Output ports and other components in order to design a complete working system. This made it economically difficult to develop computerized consumer appliances on a large scale as the system cost is very high. Microcontrollers are the devices that actually fit the profile “Computer – on – a chip” as it consists of a main processing unit or processor along with some other components that are necessary to make it a complete computer. The components that are present on a typical microcontroller IC are CPU, memory, input / output ports and timers. The first microcontroller was developed in 1971 by Texas Instruments and is called TMS 1000. It was made available for commercial use in 1974. The block diagram of a microcontroller is shown below.
Microcontrollers are basically used in embedded systems. Computerized or digital control of devices is made plausible with the development of microcontrollers. The development process of microcontroller is similar to that of a microprocessor.
Microcontrollers can be classified based on bus width, memory structure and instruction set. Bus width indicates the size of the data bus. Microcontrollers can be classified as 8 – bit, 16 – bit or 32 – bit based on the bus width. Higher bus widths often result in better performance. Microcontrollers can be divided into two types based on their memory structures: Embedded Memory and External Memory. In case of embedded memory microcontrollers, the required data and program memory is embedded into the IC. Whereas external memory microcontrollers do not have program memory embedded on them and require an external chip for the same. Now a day, all microcontrollers are embedded memory microcontrollers. The classification based on instruction set is similar to that of a microprocessor. They can be either CISC or RISC. Majority of microcontrollers follow CISC architecture with over 80 instructions. Microcontrollers can also be divided based on their computer architecture into von Neumann and Harvard.
The following are epitomizes some of the differences between microprocessors and microcontrollers.
- Microprocessor assimilates the function of a central processing unit (CPU) on to a single integrated circuit (IC).
- Microprocessors are mainly used in designing general purpose systems from small to large and complex systems like super computers.
- Microprocessors are basic components of personal computers.
- Computational capacity of microprocessor is very high. Hence can perform complex tasks.
- A microprocessor based system can perform numerous tasks.
- Microprocessors have integrated Math Coprocessor. Complex mathematical calculations which involve floating point can be performed with great ease.
- The main task of microprocessor is to perform the instruction cycle repeatedly. This includes fetch, decode and execute.
- In order to build or design a system (computer), a microprocessor has to be connected externally to some other components like Memory (RAM and ROM) and Input / Output ports.
- The overall cost of a system built using a microprocessor is high. This is because of the requirement of external components.
- Generally power consumption and dissipation is high because of the external devices. Hence it requires external cooling system.
- The clock frequency is very high usually in the order of Giga Hertz.
- Instruction throughput is given higher priority than interrupt latency.
- Have few bit manipulation instructions
- Generally microprocessors are not used in real time systems as they are severely dependent on several other components.
- Microcontroller can be considered as a small computer which has a processor and some other components in order to make it a computer.
- Microcontrollers are used in automatically controlled devices.
- Microcontrollers are generally used in embedded systems
- Less computational capacity when compared to microprocessors. Usually used for simpler tasks.
- A microcontroller based system can perform single or very few tasks.
- Microcontrollers do not have math coprocessors. They use software to perform floating point calculations which slows down the device.
- In addition to performing the tasks of fetch, decode and execute, a microcontroller also controls its environment based on the output of the instruction cycle.
- The IC of a microcontroller has memory (both RAM and ROM) integrated on it along with some other components like I / O devices and timers.
- Cost of a system built using a microcontroller is less as all the components are readily available.
- Power consumption is less.
- Clock frequency is less usually in the order of Mega Hertz.
- In contrast, microcontrollers are designed to optimize interrupt latency.
- Bit manipulation is powerful and widely used feature in microcontrollers. They have numerous bit manipulation instructions.
- Microcontrollers are used to handle real time tasks as they are single programmed, self sufficient and task oriented devices.
Setting aside the differences between the microprocessor and microcontroller, it is clear that a microprocessor cannot replace a microcontroller and vice versa. Both pieces of technology have their unique way of usage in applications.