Microcontroller Architectures
Deshila Technology Research Institute
Specialized hands-on education in Embedded Systems
A microcontroller, as we know, is a small Integrated Circuit (IC) which is designed to primarily perform a specific task on an embedded system. It usually includes a processor, memory , and peripherals for input and output. A microcontroller is also known as an embedded controller.
Microcontrollers come with different processing capabilities such as 4 bit, 8bit, 16bit, 32bit, and 64bit which denotes how much data they can process at a time. Microcontrollers can also use different types of memories such as RAM, flash, EPROM, and EEPROM based on the requirement.
Though there are various differences in the commercially available microcontrollers such as their processing capacity, speed, memory size, memory type, the number of pins they provide for general purpose input/output and interfacing external components such as sensors, displays, LEDs, motors etc, all these microcontrollers are designed based on only two architecture models which are : the Harvard Architecture and the Von Neumann Architecture.?
Harvard Architecture and Von Neumann Architecture provide two different ways of exchanging data between the CPU and memory. Harvard Architecture is also known as RISC (Reduced Instruction Set Computer) architecture and microcontrollers using this architecture are called RISC microcontrollers. Von Neumann Architecture is also known as CISC (Complex Instruction Set Computer) architecture and microcontrollers using this architecture are called CISC microcontrollers.
The name Harvard architecture originated from the Harvard Mark-1 relay based computer where this architecture was first used. In this architecture the data bus and address bus are separate which allows for simultaneous data transfers. Here the flow rate of data to CPU is more and so the working speed is also greater. The number of instructions are also fewer as compared to Von Neumann architecture and more instructions are executed in one cycle. In this architecture the memory unit is divided into two parts for separately storing data and instructions, and separate buses are used for data transfer and instruction fetching. So, efficient utilization of resources occurs and execution time is minimized. In this model the CPU must be more efficient to handle two sets of buses and also conduct simultaneous instruction fetching and data transfers. Harvard architecture has become more popular in embedded systems because there is separation of storage and signal pathways which increases the performance and speed and also reduces the power consumption. Image below shows the Harvard architecture.
Von Neumann architecture was given by the Hungarian physicist and mathematician John Von Neumann. This architecture consists of a single shared memory and a single bus for memory access, one input and output unit, an arithmetic unit, and a program control unit. This architecture requires two clock cycles to execute one instruction as only one bus is used to transfer both data and instructions. The system is less complex and execution speed is slower here but there is no wastage of space. This architecture is less expensive and is mainly employed in the development of operating systems. The main drawback of Von Neumann architecture is that it can result in bottleneck because the CPU spends a lot of time in idle state while waiting for data to be fetched from memory irrespective of how fast the processor is and this slows the flow in the execution of a process due to accumulation of instructions in one or more activities . Image below shows Von Neumann architecture.