IOT

Everything You Need To Know About 8051 Micro controller? | Basics for Beginners

A micro controller is a single-chip computer that incorporates all of the functions found in a microprocessor. It has a high concentration of on-chip facilities such as RAM, ROM, I/O ports, timers, serial port, clock circuit, and interrupts to support various applications. Micro controllers are utilized in remote controls, vehicle engine control systems, medical devices, power tools, office machinery, toys, and other embedded systems, among other things. This article provides an overview of the 8051 microcontroller, as well as 8051 Micro controller,its pin diagram,advantages, disadvantages and applications.

Intel created the 8051 microcontroller in the 1980s. It was built primarily to put Embedded Systems into play and was based on Harvard Architecture. It was originally designed using NMOS technology.As NMOS requires more power to operate, Intel redesigned Microcontroller 8051 using CMOS technology, and a new edition was born with the letter ‘C’ in the title name, for example: 80C51. In comparison to their predecessors, these contemporary Microcontrollers require less electricity to work.

INTRODUCTION TO 8051

The 8051 designed as an effectively low-power, high-performance CMOS 8-bit microcontroller. It comes with 4K bytes of in-system programmable Flash memory manufactured using Atmel’s high-density non-volatile memory technology. Meanwhile, it is compatible with the industry-standard 80C-51 instruction set and pinout. The on-chip Flash on the chip permits the program memory to be reprogrammed in-system.  Or via a standard non-volatile memory programmer.

In this Atmel microcontroller,  by combining a flexible 8-bit CPU with in-system programmable Flash on a monolithic chip, Atmel 8051 becomes effectively powerful microcontroller. In order that it delivers a highly flexible and affordable solution to various embedded control applications. Moreover, this IC features 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a Watchdog timer, and two data pointers. And also equipped with five vector two-level interrupt architecture, a full-duplex serial port interface, on-chip oscillator and clock circuitry.

In addition to it, the 8051 equipped with static logic for operation right down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the functioning of the CPU allowing the RAM, timer/counters, serial port, and interrupt system to continue their operation. Whereas, the Power-down mode saves the RAM contents but freezes the oscillator. Thereby disabling all other chip functions until the next external interrupt or hardware reset. These two features makes it suitable for battery operated applications.

FEATURES OF 8051 MICROCONTROLLER:

  • 8-bit CPU through two Registers A & B
  • It have four register banks
  • 64K bytes on-chip programmable memory (ROM)
  • 128 bytes on-chip data memory (RAM)
  • Address bus is 16-bit unidirectional
  • Data bus is 8-bit bidirectional
  • 128 user defined flags
  • 16-bit Timers or Counters  like T0 & T1.
  • Interrupts: 5
  • Program Counter – 16 bit & DPRT (Data Pointer).
  • I/O Pins – 32 which are arranged like four ports such as P0, P1, P2 & P3.
  • Stack Pointer (SP) – 8bit & PSW (Processor Status Word).
  • Serial Data Tx & Rx for Full-Duplex Operation
  • Interrupts like External-2 & Internal-3
  • Oscillator & CLK Circuit.
  • Control Registers like PCON, SCON, TMOD, TCON, IE, and IP.
  • 32 general purpose registers each of 8-bit
  • 0V to 5.5V Operating Range
  • Fully Static Operation: 0 Hz to 33 MHz
  • Three-level Program Memory Lock
  • 32 Programmable I/O Lines
  • Full Duplex UART Serial Channel
  • Low-power Idle and Power-down Modes
  • Interrupt Recovery from Power-down Mode
  • Watchdog Timer feature
  • Dual Data Pointer
  • Power-off Flag
  • Fast Programming Time
  • Flexible ISP Programming (Byte and Page Mode)
  • 8051 microcontroller offers a number of special features such as ADC, UARTs, Op-amp, etc

PIN DIAGRAM OF 8051 MICROCONTROLLER

The 8051 microcontroller has 40 pins, as illustrated in the diagram below. P0, P1, P2, and P3 are the four ports that include a total of 32 pins. Each port comprises eight pins. As a result, the pin diagram and description for the microcontroller 8051 are provided below.

  • Port1 (Pin1 to Pin8): Port1 consists of pin1.0 to pin1.7 and can be configured as  input or  output pins.
  • Pin 9 (RST): Reset pin is used to Reset 8051 Microcontroller by giving a positive pulse to this Pin.
  • Port3 (Pin 10 to 17): The Port3 Pins are similar to port1 pins and can be used as universal Input or output pins. These pins dual-function Pins and the function of each Pin is given as:
  • Pin 10 (RXD): RXD pin indicates Serial Asynchronous Communication Input or Serial Synchronous Communication output
  • Pin 11 (TXD): Serial Asynchronous Communication Output or Serial Synchronous Communication clock Output.
  • Pin 12 (INT0): Input of Interrupt 0
  • Pin 13 (INT1): Input of Interrupt 1
  • Pin 14 (T0): Input of Counter 0 clock
  • Pin 15 (T1): Input of Counter 1 clock
  • Pin 16 (WR): Writing Signal to write content on external RAM.
  • Pin 17 (RD): Reading Signal to read contents of external RAM.
  • Pin 18 and 19 (XTAL2, XTAL1): X2 and X1 pins are input output pins for the oscillator. These pins are used to connect an internal oscillator to the microcontroller.
  • Pin 20 (GND): Pin 20 is a ground pin.
  • Port2 (Pin 21 to Pin28): Port2 comprises of pin21 to pin28 which can be configured as Input Output Pins. But, this is only possible  when we don’t use any external memory. In case,If we use external memory, then these pins will function as high order address bus (A8 to A15).
  • Pin 29 (PSEN): This pin allows external programme memory to be utilised. If the programme is stored in an external ROM, logic 0 appears on it, indicating that the Microcontroller should read data from the memory.
  • Pin 30 (ALE): Address Latch Enable pin is an active high-output signal. If we use multiple memory chips, then this pin is used to distinguish between them. This Pin also gives program pulse input during programming of EPROM.
  • Pin 31 (EA): If we need to access multiple memories, we can use logic 1 on this pin to tell the Microcontroller to read data from both internal and external memories.
  • Port 0 (Pin 32 to 39): When no external memory is used, these ports can be used as input output pins in the same way that port 2 and 3 pins can. This port is utilised as a data bus when ALE or Pin 30 is set to 1; when ALE or Pin 30 is set to 0, this port is used as a lower order address bus (A0 to A7)
  • Pin40 (VCC): This VCC pin is used for power supply.

8051 MICROCONTROLLER PACKAGING TYPE

The 8051 microcontroller comes in a variety of IC packaging options. Dual in-line or DIP packaging is the most popular and widely used 8051 Microcontroller packaging. It is often available as a 40 – pin PDIP or Plastic DIP IC.

The 44 – Lead PLCC packaging type is another popular option (Plastic Leaded Chip Carrier). It’s a surface mount package of some type.

The 44 – Lead TQFP is another surface mount packaging for the 8051 microcontroller (Thin Quad Flat Package).

ADVANTAGES

  • Minimum hardware because of the single chip microcomputer system. This reduces the cost.
  • Because of less hardware, the PCB size is small.
  • It increases system reliability.
  • They have smaller access time. Hence, speed of operation is high. 
  • It is easy to use, troubleshoot and maintain.
  • Most of the pins can be programmed by the user in order to perform different functions.
  • Micro-controllers have inbuilt serial ports, timer and counters, RAM, ROM, A/D converters, flash memory.
  • Micro-controller consume less power.

DISADVANTAGES

  • The micro-controllers have a complex architecture than that of a micro-processor. Hence, it is difficult to understand their functionality.
  • As micro-controllers are RISC micro-controllers, the length of program is big.
  • Only a single WREG/A is present.
  • They cannot access the program memory.
  • The micro-controller cannot be directly interfaced with high power devices.                                                                                                                                                      

APPLICATIONS OF 8051 MICROCONTROLLER

A large number of machines use the microcontroller 8051, mostly because it is simple to incorporate into a project or assemble a machine around it. The following are the important areas 8051

  • Consumer Appliances (TV Tuners, Remote controls, Computers, Sewing Machines, etc.)
  • Home Applications (TVs, VCR, Video Games, Camcorder, Music Instruments, Home Security Systems, Garage Door Openers, etc.)
  • Communication Systems (Mobile Phones, Intercoms, Answering Machines, Paging Devices, etc.)
  • Office (Fax Machines, Printers, Copiers, Laser Printers, etc.)
  • Automobiles (Air Bags, ABS, Engine Control, Transmission Control, Temperature Control, Keyless Entry, etc)
  • Aeronautical and Space
  • Medical Equipment
  • Defense Systems
  • Robotics
  • Industrial Process and Flow Control
  • Radio and Networking Equipment
  • Remote Sensing

CONCLUSION

I hope all of you got an idea of the 8051 micro controller, as well as,its pin diagram,advantages, disadvantages and applications.Hope all of you find this article informative. For more queries, contact our online store-MATHA ELECTRONICS

Leave a Reply

Your email address will not be published.