Table of Contents
More and more we have heard the name of microcontroller and microprocessors. For those who work with electronics, microcontrollers are a wonderful thing. But many of us think microcontrollers are only for made robots and microprocessors are just impossible to do in computers. So they don’t even think about working with microcontrollers and microprocessors.
But microcontrollers and microprocessors are now largely responsible for the improvements made to digital control systems or automatic control systems. So we have to work with more controlling systems. We want our next generation to find a rich knowledge base easily. Work on more controlling issues. In this article, we will discuss the microcontroller in detail. Hopefully from this article, you will get a better idea about microcontrollers.
What is a Microcontroller?
Micro and Controller The two together are an English word microcontroller. Micro means small and controller means controlling. Then it makes sense that a small thing will control. It can actually be called a small computer. It has a processor, RAM, memory input/output edge at the same time.
μC is a microcontroller and the MCU is a microcontroller unit.
Function of Microcontroller
In simple words, it is the task of performing certain tasks according to certain rules. Programming is defined as a specific rule. The microcontroller will output its output exactly as we instruct it through programming. It is also called a programmable device. You can program it as many times as you want.
The microcontroller basically converts analog work into digital. So what are the analog tasks? Analog work is meant to work on various types of IC, transistor diode and so on. The microcontroller can work on all of these devices simultaneously with a digital value (0,1).
Suppose we create a 7 segment clock. For this, we will need 7 segment driver IC, time counter circuit, time setting circuit, etc. The funny thing is that this can be done easily with only microcontrollers.
Types of Microcontrollers
According to the size of processing word
- 4-bit micro-controller.
- 8-bit micro-controller.
- 16-bit micro-controller.
- 32-bit micro-controller.
According to instructions or instruction set
- RISC micro-controller.
- CISC micro-controller.
According to memory connection
- Internal memory micro-controller.
- External memory micro-controller.
According to the micro-controller memory architecture
- Harvard Architecture Micro-Controller.
- Von-Neumann Architecture Micro-Controller.
What Is a Microprocessor?
A microprocessor is basically a digital integrated circuit (IC) that normally receives data and instructions via the input bus, processes the data according to the input, produces the results, and transmits those results to the output device via the output bus.
Input produces various control signals to control the output device. The logical and mathematical functions of a computer are organized in a microprocessor. A microprocessor is an important part of a computer system that functions as a central processing unit. For example Intel 8085, MC 68000, Z80 Examples of some popular microprocessors.
Difference Between a Microcontroller and a Microprocessor
- A microcontroller is basically a single chip computer with a processor, RAM, ROM, and input/output port. And the microprocessor is an integrated circuit that acts as the central processing unit on the computer. This is why sometimes it is called the CPU.
- The microcontrollers are Intel 8051, Atmel ATmega16, etc. Microprocessors are Intel x86 family microprocessors 8086, 80816, 80286, 80386, etc.
- Inside the microcontroller, there is a whole processor such as RAM, ROM, I/O port, etc. Inside the microprocessor are ALU, General Purpose Register, Accumulator, Program Counter, Flag Register, Data and Counter Bus and so on.
Structure of Microcontroller
The basic components that make up the microcontroller are shown in the figure below. Different manufacturing companies form microcontrollers in different ways. We will now look at the structure of a simple and basic microcontroller.
The CPU means a central processing unit made up of ALU, Accumulator, Control Unit, Flag, Stack Pointer, and some general-purpose registers. The logical functions of the microcontroller are in the CPU’s ALU. The instruction is transferred from the RAM to the instruction register. The assembly essentially converts language instruction into machine language. The required logical tasks are performed in the ALU. Finally transmits the output to the memory register.
The semiconductor memory is used inside the microcontroller where there is RAM, ROM. RAM is a temporary memory that is erased when the power supply is off, whereas data is permanently stored in the ROM.
Input / Output port
The port that receives and emits these signals is called the input/output port. These ports are one or more resistors of the microcontroller whose bit is logically connected to the external pin of the microcontroller. You can specify the same port as input and output by the user if desired.
There are two types of ports
- Serial port: Serial port for serial data communication.
- Parallel Port: Parallel Port for Parallel Data Communication.
Timers And Counters
Most microcontrollers have one or in some cases more than one timer counter. It basically calculates time schedules, breaks, etc. Its main function is to measure the frequency and clock function. It is mainly an 8 bit or 16-bit register.
Digital To Analog Converter
It converts the digital signal to an analog signal and controls various analog devices.
Analog to digital converter
Incoming signals from various analog sensors and analog devices enter the microcontroller. But we know the CPU of the microcontroller cannot read analog data. So the signal has to be converted into a digital signal. That’s basically what this converter does.
The interrupt is another function that interrupts the normal flow of a program during a program. After executing the task, the processor goes back to the original program. This is basically the task of the interrupt controller.
The microcontroller uses complex security systems and several important things. Programming or interrupting the operation of hardware due to errors during microcontroller operation. The watchdog timer monitors this state at all times and automatically resets and restarts if there are problems with the program or hardware.
The programming language used microcontroller
There are many types of programming languages for microcontrollers. However, programming C language flaws is better. Because C language is called the “mother” of programming. Many programmers stand in the language of C language. The best compiler for a microchip is Micropro Pick. Compile the program basically with it.
The microcontroller program write or burn method
After writing the program or code correctly in C programming software, it must be loaded into the microcontroller. The device needs a device called a Load PIC Programmer / PIC Burner to load the program. It has to be installed on the computer. You can find the software only by searching online.
Advantage & Disadvantage Of Microcontroller
- The low time required for performing an operation.
- The processor chips are very small and flexible.
- Due to their higher integration, the cost and size of the system are reduced.
- The microcontroller is easy to interface additional RAM, ROM, and I/O ports.
- Once microcontrollers are programmed then they cannot be reprogrammed.
- At the same time, many tasks can be performed so human effects can save.
- Without any digitals parts, it can act as a microcomputer.
- It is easy to use, troubleshooting and systems maintenance is simple.
- The microcontroller cannot interface high power devices directly.
- It has a more complex structure as compared to the microprocessor.
- It only performed a restricted number of executions simultaneously.
- It is generally used in micro equipment.
Some Popular Brands Of Microcontrollers
- Microchip PIC / dsPIC.
- Arduino (made with AVR).
- Atmel (AVR / ARM).
- Toshiba / Samsung / Intel etc.
There are many other brands.
PIC16F series : 16F877, 16F72, 16F628, 16F676 etc. There are many more models. Besides PIC18F, PIC24F, PIC32F etc. There are series. However, they are different from each other but not completely different. But it is a widely used, 16F877A model. Each microcontroller has its own features. We have to sort them according to the type of work.
- The word size of the processor: The ALU of a microcontroller is a single instruction as much as bit data can perform logical and mathematical functions, called microcontroller word size. Word size microcontrollers are available in the market of 4, 8, 16, 32 bits. Clock frequency microcontrollers should be used as per the demand.
- Speed of work: Clock frequency microcontrollers should be selected to suit the needs of the system.
- RAM and ROM: Considering this, microcontrollers should be selected according to demand.
- Input-Output: Considering the pins and timers, buy a microcontroller.