Robots are widely used in industries due to their characteristics. Robots are able to work 24 hours continuously without feeling tired unlike human that confined to certain time. The cost required to setup the robot nowadays becomes more affordable and their long term prospectus is bright judging from their capabilities to perform. But in reality, there is no robot able to functions perfectly and are still making error. A better controller is required to allow the robot performs efficiently and make less error.
The objective is to build a robot by interfacing all the peripherals associated with it like sensors, motors and make it a fully automated bot.
The Controller board: Microcontrollers and Microprocessors based development boards
A Microcontroller (or MCU, short for Microcontroller unit) is a small computer (SoC) on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of Ferroelectric RAM, NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications consisting of various discrete chips
Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems.
Some Microcontrollers may use four-bit words and operate a frequencies as low as 4 kHz, for low power consumption (single-digit milliwatts or microwatts). They will generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just nanowatts, making many of them well suited for long lasting battery applications. Other Microcontrollers may serve performance-critical roles, where they may need to act more like a digital signal processor (DSP), with higher clock speeds and power consumption.
What is the difference between microprocessor and microcontroller?
You must always be confused when you are asked about difference between microprocessors and microcontrollers. As it seems to be same but it’s not. So let’s discuss about them and point out the major differences between them.
It’s like a small computer on a single IC. It contains a processor core, ROM, RAM and I/O pins dedicated to perform various tasks. Microcontrollers are generally used in projects and applications that require direct control of user. As it has all the components needed in its single chip, it does not need any external circuits to do its task so microcontrollers are heavily used in embedded systems and major microcontroller manufacturing companies are making them to be used in embedded market. A microcontroller can be called the heart of embedded system. Some examples of popular microcontrollers are 8051, AVR, PIC series of microcontrollers.
Above is architecture of 8051 Microcontroller. And you can see all the required components for a small project is present in a single chip.
Microprocessor has only a CPU inside them in one or few Integrated Circuits. Like microcontrollers it does not have RAM, ROM and other peripherals. They are dependent on external circuits of peripherals to work. But microprocessors are not made for specific task but they are required where tasks are complex and tricky like development of software’s, games and other applications that require high memory and where input and output are not defined. It may be called heart of a computer system. Some examples of microprocessor are Pentium, I3, and I5 etc.
From this image of architecture of microprocessor it can be easily seen that it have registers and ALU as processing unit and it does not have RAM, ROM in it.
So, what is the difference between microprocessor and microcontroller?
As now you are basically aware of what is a microcontroller and microprocessor, it would be easy to identify the major differences between a microcontroller and microprocessor.
1. Key difference in both of them is presence of external peripheral, where microcontrollers have RAM, ROM, EEPROM embedded in it while we have to use external circuits in case of microprocessors.
2. As all the peripheral of microcontroller are on single chip it is compact while microprocessor is bulky.
3. Microcontrollers are made by using complementary metal oxide semiconductor technology so they are far cheaper than microprocessors. In addition the applications made with microcontrollers are cheaper because they need lesser external components, while the overall cost of systems made with microprocessors are high because of the high number of external components required for such systems.
4. Processing speed of microcontrollers is about 8 MHz to 50 MHz, but in contrary processing speed of general microprocessors is above 1 GHz so it works much faster than microcontrollers.
Features of 8051 Microcontroller
An 8051 microcontroller comes bundled with the following features −
64K bytes on-chip program memory (ROM)
128 bytes on-chip data memory (RAM)
Four register banks
128 user defined software flags
8-bit bidirectional data bus
16-bit unidirectional address bus
32 general purpose registers each of 8-bit
16 bit Timers (usually 2, but may have more or less)
Three internal and two external Interrupts
Four 8-bit ports,(short model have two 8-bit ports)
16-bit program counter and data pointer
8051 may also have a number of special features such as UARTs, ADC, Op-amp, etc.
Block Diagram of 8051 Microcontroller
The following illustration shows the block diagram of an 8051 microcontroller −