pin diagram 8051 microcontroller

8051 Microcontroller pin Diagram and pin description

Share

Home » 8051 Microcontroller pin Diagram and pin description

In 1981, Intel introduced an 8-bit microcontroller called the 8051 microcontroller. This is one of the most popular and most commonly used microcontrollers in various fields like embedded systems, consumer electronics, automobiles, etc. Microcontroller have all features that are found in microprocessors with additional built-in ROM, RAM, I/O ports, Serial ports, Timers, Interrupts, and Clock circuits.

8051 microcontroller based on Harvard Architecture and developed primarily use in embedded  systems. Basically, 8051 microcontroller was developed by using HMOS technology, which required more power to operate. Therefore, Intel redesigned Microcontroller 8051 using CMOS technology and  their updated versions is 80C51 this required less power to operate.

Read more :

8051 MICROCONTROLLER PIN DIAGRAM

8051 microcontroller is available in 40 pin Dual Inline package (DIP). All these 40 pins perform different functions like read, write, interrupts, I/O operations, address etc. 8051 microcontroller have four I/O ports (Port-1, Port-2, Port-3, Port-4 ) where in each port has 8 pin. Each pin configured as a input pin or output pin depends on logic state of the pin. Therefore, out of 40 pins, 32 pins are allotted for I/O port. The remaining  pins are assigned to VCC, GND, XTAL1, XTAL2, RST, ALE, EA’ and PSEN’.

Now, the microcontroller 8051’s pin diagram and explanation is given below.

Pin Diagram of 8051 Microcontroller

Explanation of the Pins :

Pin 1 to Pin 8 (Port – 1) – Pin 1 to Pin 8 is assigned to Port 1 for simple I/O operations. These ports are work as a bidirectional port. It means all the pins of port 1 work as a input pin or output pins. If Logic 1 (one) is applied to the I/O port it will act as a input pin and if logic 0 (zero) is applied to the I/O port it will act as a output pin.

Pin 9 (RST) – It is a reset input Pin, which is used to reset the 8051 microcontrollers to its initial values when logic 1 is applied to this pin. It is active high pin.

Check out my you tube video for Hindi explanation of Pin Diagram of 8051 Microcontroller

Pin 10 to Pin 17 (Port-3) – Pin 10 to Pin 17 are assigned to Port 3. This port is also a bidirectional I/O port like port 1. This port performs some special functions like interrupts, control signals, timer input, serial communication etc. The detail function of each pins are given below:

  • P 10 (RXD) – Pin 10 is used as a RXD (serial data receive pin) which is for serial input pin. By using this input signal microcontroller receives data for serial communication.
  • P  11 (TXD) – Pin 11 is used as a TXD (serial data transmit pin) which is serial output pin. By using this output signal microcontroller transmits data for serial communication.
  • P 12 and P 13 (INT0′, INT1′ ) – Pins12 and 13 are used for External Hardware Interrupt 0 and Interrupt 1 respectively. When this interrupt is activated (i.e. when it is low), 8051 gets interrupted means it stopped whatever it is doing and jumps to the vector table where ISR’s (Interrupt Service Routine) are stored and starts performing Interrupt Service Routine (ISR) from that vector location.
  • P 14 and P 15 (T0 and T1) – Pin 14 and 15 are used for Timer 0 and Timer 1 external input. They can be connected with 16-bit timer/counter.
  • P 16 (WR’) – Pin 16 is used for external memory write i.e. writing data to the external memory.
  • P 17 (RD’) – Pin 17 is used for external memory read i.e. reading data from external memory.

Pin 18 and Pin 19 (XTAL2 And XTAL1) –Pins 18 and 19 i.e. XTAL 2 and XTAL 1 are the pins for interfacing external oscillator. Mostly, a Quartz Crystal Oscillator is connected here to get the system clock.

Pin 20 (GND) – Pin 20 is the Ground Pin. It is connected to the 0V (negative terminal) of the Power Supply.

Pin 21 to Pin28 (Port 2) – Pin 21 to pin 28 are port 2 pins. Port 2 is also a bidirectional Input /Output port i.e, all pins of port 2 work as a input pin or as a output pins. But, this is only possible when we are not using any external memory. If we use external memory, then these pins will work as high order address bus (A8 to A15).

Pin 29 (PSEN) – The Pin 29 is the Program Store Enable Pin (PSEN). It is used to enable external program memory and read a signal from the external program memory.

Pin 30 (ALE) – Pin 30 is the Address Latch Enable Pin. This pin is used to enable or disable the external memory interfacing.

Pin 31 (EA) – Pin 31 is the External Access Enable (EA) Pin. This pin allows external Program Memory. It is an input pin and connected from VCC or GND. If we want to access the program from external program memory, it must be connected with GND. If we want to use on-chip memory, it must be high (connected with VCC).

Pin 32 to Pin 39 (Port 0) – Pin 32 to Pin 39 are Port 0 pins. when we don’t use any external memory, these pins are used as a bidirectional pin like port 2 and port 3. But, when ALE or Pin 30 is at 1, then this port is used as data bus. And when the ALE pin is at 0, then this port is used as a lower order address bus (A0 to A7).

Pin 40 (VCC) – This pin is used to provide (+5v ) power supply to the 8051 microcontroller circuit.

Check out my you tube video for explanation of Pin Diagram of 8051 Microcontroller

FAQ’s (Frequency Asked Questions)

How many pins are there in 8051 microcontroller?

In 1981,Intel introduced an 8-bit microcontroller called the 8051 microcontroller. It is available with 40 pins DIP (dual inline package), 4kb of ROM storage and 128 bytes of RAM storage, 2 16-bit timers. It consists of are four parallel 8-bit ports, which are programmable as well as addressable as per the requirement.

What is the function of EA pin in 8051 microcontroller ?

Pin 31 is the External Access Enable (EA) Pin. This pin allows external Program Memory. It is an input pin and must be connected from VCC or GND. If we want to access the code from external program memory, it must be connected with GND. If we want to use on-chip memory, it must be high (connected with VCC).

What is the function of reset pin in microcontroller?

Pin 9 (RST) – It is a reset input Pin, which is used to reset the 8051 microcontrollers  to its initial values when logic 1 is applied to this pin. It is active high pin.

Which port is used as multifunction port?

Port 3 is multifunction part it can be used as a simple input/output port.

What happens when a high is applied to reset pin?

It is available at pin 21. When it is high, it indicates that the device is ready to transfer data. When it is low, it indicates wait state.

How many timer is 8051?

The 8051 microcontroller has two timers, Timer 0 and Timer 1. They can be used as timers or as event counters. Both Timer 0 and Timer 1 are 16-bit wide. Since the 8051 follows an 8-bit architecture, each 16 bit is accessed as two separate registers of low-byte and high-byte.

Download 8051 microcontroller notes


Share

Leave a Reply

Your email address will not be published. Required fields are marked *