Introduction to 8051 Microcontroller
Hello Friends! Hope you are doing great. I am back to give you a daily dose of valuable information so you can excel and grow in your relevant field and keep coming back for what we have to offer. Today, I am going to unlock the details on the
Introduction to 8051 Microcontroller. This is an 8-bit Microcontroller developed by Intel in the 1980s. It is considered as a small system on an integrated chip that comes with CPU, I/O ports, timers, counters, RAM and ROM. The Microcontroller is a one step forward to a microprocessor.
Both
Microcontrollers and microprocessor work in a similar way with some exceptions. Microcottler comes with everything required to run an embedded system like CPU, I/O ports and inbuilt peripherals like timers, counters, and interrupts. While processor comes with the processing unit and in order to make it work like a microcontroller, separate peripherals are required to connect with the microprocessor. Other examples of microcontrollers are
PIC Microcontroller, Atmel &
Arduino etc.
The 8051 is the most common used microcontroller nowadays. If you are a newbie and trying to get your hands on very first time with a microcontroller you will be advised to start with 8051. It is the most commonly used Microcontroller in
Embedded Systems.
Technology is evolving and becoming more advanced day by day. Gone are days, when you required separate systems or chips to perform a specific task. Now, most of the chips and electronic systems are developed with the purpose of performing multiple tasks using a single system that comes with a number of integrated circuits incorporated in it that sets you free from the hassle of spending lot of money on the individual system, making our project highly economical in nature.
I'll try to discuss each and everything related to 8051, so you get a clear idea of what it does, its main features, working, applications and everything you need to know. You should also have a look at these
8051 Microcontrollers Projects. So, let's get started with Introduction to 8051 Microcontroller:
Introduction to 8051 Microcontroller
- The 8051 Microcontroller is a 40-Pin integrated chip that comes with CPU and other peripherals like I/O, timers, counters, RAM and ROM.
- It is widely used in an embedded system, consumer electronics, automotive systems, robotics and security cameras.
- The 8051 microcontrollers have made a renowned place in the market in terms of their availability, low cost, and operational flexibility.
- Before the inception of microcontroller, everything that required automatic action was designed with the processor. That made overall project more costly that would cover more space.
- The 8051 was developed using Intel 8051 MSC-51 architecture.
- Older versions of 8051 used assembly programming language, however, recent editions can be programmed using more advanced language like C, Python or JavaScript.
- Microcontrollers have revitalized the robotics and removed the need for extra devices to make them function like an automatic system.
- Earlier, microcontrollers were produced using N-MOS technology that came with more power consumption and less efficiency. However, recent CMOS technology introduced in the development of the microcontrollers requires less power as compared to its predecessor.
- 8051 comes in a variety of packages but the most common package is a DIP (dual inline package). However, it is also available in other surface mount packaging like 44 - Lead TQFP (Thin Quad Flat Package) and 44 – Lead PLCC (Plastic Leaded Chip Carrier).
8051 Architecture
Following features of the microcontroller define the overall architecture of the controller.
- CPU. The central processing unit is considered as the main part of the controller that is capable of performing different tasks based on the instructions given by the user.
- It is a like a brain of the device that reads instructions from data memory (ROM). However, a user has no direct control over the internal function of CPU except code with a number of instructions embedded into the unit through the compiler.
- Storage Memory. CPU is used to call and execute the set of instructions. A memory is required to store those number of instruction. There are two sets of memory locations present in the device called ROM and RAM.
- The ROM comes with 4k bytes memory while RAM comes with 128 bytes. The information stored in the ROM memory is known as code or program memory. This memory is non-volatile where information sustains over a long period of time and doesn't require a constant source of power supply to hold information in it.
- While RAM memory is volatile in nature and stores information for short period of time and requires a constant source of power supply to retain information in it. As you remove the power supply the RAM memory removes from the memory location.
- Interrupts. Interrupts are very useful in case of emergency. They are used to put the main program on hold when a specific function is required to perform over the main function.
- The system switches to the main program after the interrupt is called and executed properly. There are five interrupts present in the architecture of 8051 known as INT0, TF0, INT1, TF1, R1/T1
- All these interrupts are used to pause the main program. TF0 and TF1 are timer interrupts while INT0 and INT1 are external interrupts. R1/T1 is a serial port interrupt.
- All external interrupts are low level triggered where flags are cleared when the processor is connected to the interrupt service routine.
- Serial Port. The 8051 comes with UART (Universal Asynchronous Receiver/Transmitter) which is used for serial communication in 8051. The serial port is duplex i.e. it can transfer or receive data. Serial port comes with three pins called Tx, Rx and ground.
- Buses. Buses are the valuable addition in the development of the microcontroller that are used for the data transmission. Mainly two buses are used for the communication called Data Bus and Address Bus and are 8 bit and 16 bit respectively.
- The size of the address bus predicts the amount of memory a system can address. The 16-bit address bus determines it can address memory up to 2 (64k).
- Address bus comes with four addressing modes called immediate addressing mode, direct addressing modes, register addressing mode, register indirect addressing mode.
- The Data Bus is used for the transfer of data for a particular application within microprocessor and memory I/O devices. It is bi-directional and used for sending and receiving data.
- The CPU's circuitry determines the width of the data bus.
- I/O Ports. Microcontroller comes with four I/O ports called P0, P1, P2, and P3. These ports are used to interface controller with other devices. Each port comes with 8 pins, making it an 8-bit port. Once these ports are reset, they are used as an output port. However, we need to program them in order to use them as an input port.
- Timers/Counters. 8051 microcontroller comes with two 16 bit timers and counters. Timers are used to count the internal signal of a particular function of the controller while counters are used to count the external signals of the peripherals connected to the controller. These timers are further divided into an 8-bit register.
- Oscillator. It is added in the controlled for generating clock pulses. It works as a clock source for CPU of the controller. The oscillator works over a certain frequency when a certain voltage is applied.
8051 Basic Circuit
Following figure shows the pin diagram of 8051 microcontroller.
As figure shown above, 8051 comes with 40 - Pin Dip that contains 20 pins on each side. It has four ports and 8 pins are associated with each port. Let's describe the function of each port one by one.
Port 0. Pin number from
32 to 39 belong to Port0. These pins are bidirectional and come with internal pull-up resistors. Port0 is multiplexed with data and address bus.
Port 1. Pin from
1 to 8 falls under Port 1 that is the 8-bit port where each pin is bidirectional. This port comes with internal pull-up resistors.
Port 2. Pin from
21 to 28 falls under Port 2. All the port 2 pins are bi-directional like port 1 and are used as I/O pins. Port 2 pins behave like a higher order address/data bus when external memory is accessed.
Port 3. Port 3 contains pins from
10 to 17 number. All pins of the port 3 come with special functions. Following are the main functions associated with each pin.
RST. Pin
9 represents the reset pin. The controller will be reset by holding RST HIGH for at least two machine cycles.
GND and Vcc. Pin
20 represents the ground pin that represents 0V and connected to the negative terminal of the power source, while Pin
40 represents the power source pin that requires 5 V.
PSEN. Pin
29 is PSEN (Program Stored Enable Pin) which is used for reading external program memory.
ALE. Pin
30 is ALE ( Address Latch Enable) that is mainly used for separation of external address from data.
VPP. Pin
31 is external access enable pin used for external program memory. If this pin is set LOW, it can fetch the code from external program memory.
Applications
The 8051 comes with a wide range of applications, but it is mainly used for the embedded system. Following are some applications it is used for.
- Industrial automation
- Process control devices
- Home Applications (Camcorder, Music InstrumentsTVs, VCR, Video Games, Oven)
- Safety devices and automotive applications
- Temperature sensing and safety devices
- Parking indication system
- Fire detection and defense applications
- Defense and medical equipment
- Arduino DC motor speed control
- GSM based electricity meter billing
- Voice controlled system
- Communication Systems (Intercoms, Answering Machines, Mobile Phones, Paging Devices)
- Aeronautical and Space systems
- Robotics and Automation
So, that was all for today. I hope you have enjoyed today's tutorial about 8051 Microcontroller. Will meet you guys in the next tutorial. Take care and have fun !!! :)
PCB Solution You Need by WellPCB
Hey Friends! This is a platform where we keep you updated with useful information so you keep coming back every now and then. Today, I am going to give a quick review about one of the best PCB solution providers called
WellPCB.
Developing electronic project becomes easy when you know all components will be produced as per your requirement. You can't compromise anything when you need accurate and precise results.
The breadboard is useful for developing the electronic project, but it provides a temporary solution and takes a lot of your time because misplacement of one wire can put you in trouble. However, when things go complex and require a permanent solution, breadboards fail to fulfill the requirement. In that case, you switch your mode of operation from breadboard to
PCB that provides a permanent solution and sets you free from the hassle of constantly checking the whole circuitry again and again.
There are many PCB prototype and assembly services that claim to be best for providing flawless PCB solution to your electronic projects. However, you can not predict the performance of companies unless you have practical experience working with them.
The company we prefer most of the time is WellPCB that keeps your demands on the top and helps you design your project.
PCB Prototype and PCB Assembly Service Provider
If you come with a technical background, you must be aware of the importance of quality PCB. You can not compromise your whole project for the sake of getting low-quality product. When you intend to design your project, you are highly concerned about picking the right PCB solution provider that helps you achieve your goals and turns your innovative ideas into reality.
This is the reason, today I am going to give an unbiased review about an outstanding PCB service provider. Following are the main reasons why you should prefer
WellPCB over others.
Quality Assurance
This company comes with 10-years experience in the designing of printed boards and encompasses all the certification required to produce the quality product. Following are the certifications they have got so far, based on the quality product they produce.
- ISO14001 (2004) ISO9001 (2008), Certified
- UL Certified
- TS16949 (2009) Certified
- All products follow the IPC & ROHS Standard
These certifications will help you make the final decision about PCB board you intend to produce. They don't put your demands on stake for getting their financial gains. They know how to keep customers satisfied by providing dynamic and flawless service, so customers feel no hesitation in choosing their company again and again.
They have allocated separate department for maintaining quality assurance that keeps a proper check on the quality of the product. They do a regular inspection of the PCB equipment and follow strict protocols to maintain the top-notch service.
Flexible PCB Manufacturing Services
You can get a single layer or double layer board based on your requirements. However, the number of layers would increase when the nature of your project goes complex. Don't you worry, you can place an order for getting PCB covered with up to 32 layers. This gives you the flexibility of choosing the number of layers from many given options.
Finished copper ranges from 0.5 to 5 ounces where the thickness of 1-ounce means; 1-ounce of copper will be laid out on the area of one square foot of the board.
Finished board thickness ranges from .2 to 5 mm that all depends on the complexity and the nature of your board. When you have given all options to choose from, it helps you make a final decision that aligns with your demands and helps you incorporate the board into the project.
PCB Assembly
PCB assembly is an important service provided by them. If you are not too technical, you’d prefer getting both PCB and PCBA (Printed Circuit Board Assembly) services from one stop.
This company not only provides you quality board but also helps you mounting the required components on the board, so you can pay attention to other parts of the project like designing and troubleshooting. You can choose from Surface Mount or Thru-Hole technology.
They provide you a number of boards ranging from a
single layer, double layer, rigid board, multilayer, to
rigid-flex boards.
The final product you get will be covered with silkscreen and solder mask that makes copper traces in place and provides insulation in case board is subjected to high temperature and pressure.
Fast Delivery
Time is very important especially when you are working on client's project and you have to deliver on time. Lead time is very fast and you can get your board ready between 1 to 5 working days. However, it mostly depends on the nature of the board and the number of board you intend to get.
Mass production requires more time, in that case, lead time can increase from 7 to 14 working days.
Economical Price
You will get quality boards in economical price. If you order few or in bulk, don’t worry about the quality of the boards.
Note. Don’t forget to claim 100$ bonus if you are a newbie and joining their community very first time.
You can get 10 pieces covering one or two layers in just 3.99$. However, low price doesn’t put you in doubt of getting the low-quality product. The final product you get will truly resonate with your demands.
In case you find the final product you got is not what you ordered, you can replace the order immediately. They come with quality customer service and go extra mile unless they are sure customers are completely satisfied. You can get an instant quote
here.
That’s all for today. I hope you have got enough information about why you should prefer this company that helps you fulfill your demands and requirements at first place. In case, you are feeling unsure or have any question you can ask me in the comment section below. I’d love to help you in any way I can. Give your valuable feedback and suggestions, they help us provide you quality content that resonates with your field of interest. Thanks for reading the article.