0% found this document useful (0 votes)
162 views

Pin Diagram of 8051 Microcontroller

Detailed explanation 8051MC

Uploaded by

Angeline
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views

Pin Diagram of 8051 Microcontroller

Detailed explanation 8051MC

Uploaded by

Angeline
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.

org/pin-diagram-of-8051-microcontroller/

Data Structures Algorithms Interview Preparation Topic-wise Practice C++ Java Python

Pin diagram of 8051 Microcontroller


Difficulty Level : Medium ● Last Updated : 27 Jul, 2020

8051 microcontroller is a 40 pin Dual Inline Package (DIP). These 40


pins serve different functions like read, write, I/O operations, interrupts
etc. 8051 has four I/O ports wherein each port has 8 pins which can be
configured as input or output depending upon the logic state of the pins.
Therefore, 32 out of these 40 pins are dedicated to I/O ports. The rest of
the pins are dedicated to VCC, GND, XTAL1, XTAL2, RST, ALE, EA’ and
PSEN’.

Pin diagram of 8051 microprocessor is as given below :

Description of the Pins :


We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge
that you have read and understood our Cookie Policy & Privacy Policy
• Pin 1 to Pin 8 (Port 1) –
Got It !
Pin 1 to Pin 8 are assigned to Port▲1 for simple I/O operations. They

1 of 9 05-09-2022, 19:54
Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.org/pin-diagram-of-8051-microcontroller/

can be configured as input or output pins depending on the logic


control i.e. if logic zero (0) is applied to the I/O port it will act as an
output pin and if logic one (1) is applied the pin will act as an input
pin. These pins are also referred to as P1.0 to P1.7 (where P1
indicates that it is a pin in port 1 and the number after ‘.’ tells the pin
number i.e. 0 indicates first pin of the port. So, P1.0 means first pin of
port 1, P1.1 means second pin of the port 1 and so on). These pins
are bidirectional pins.

• Pin 9 (RST) –
Reset pin. It is an active-high, input pin. Therefore if the RST pin is
high for a minimum of 2 machine cycles, the microcontroller will
reset i.e. it will close and terminate all activities. It is often referred
as “power-on-reset” pin because it is used to reset the
microcontroller to it’s initial values when power is on (high).

• Pin 10 to Pin 17 (Port 3) –


Pin 10 to pin 17 are port 3 pins which are also referred to as P3.0 to
P3.7. These pins are similar to port 1 and can be used as universal
input or output pins. These pins are bidirectional pins.
These pins also have some additional functions which are as follows:

• P3.0 (RXD) :
10th pin is RXD (serial data receive pin) which is for serial input.
Through this input signal microcontroller receives data for serial
communication.
• P3.1 (TXD) :
11th pin is TXD (serial data transmit pin) which is serial output
pin. Through this output signal microcontroller transmits data for
serial communication.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge
• P3.2 and P3.3
that you have(INT0′, INT1′ ) our
read and understood : Cookie Policy & Privacy Policy
12th and 13th pins are forGot
External
It !
▲ Hardware Interrupt 0 and

2 of 9 05-09-2022, 19:54
Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.org/pin-diagram-of-8051-microcontroller/

Interrupt 1 respectively. When this interrupt is activated(i.e. when


it is low), 8051 gets interrupted in whatever it is doing and jumps
to the vector value of the interrupt (0003H for INT0 and 0013H for
INT1) and starts performing Interrupt Service Routine (ISR) from
that vector location.
• P3.4 and P3.5 (T0 and T1) :
14th and 15th pin are for Timer 0 and Timer 1 external input. They
can be connected with 16 bit timer/counter.
• P3.6 (WR’) :
16th pin is for external memory write i.e. writing data to the
external memory.
• P3.7 (RD’) :
17th pin is for external memory read i.e. reading data from
external memory.

• Pin 18 and Pin 19 (XTAL2 And XTAL1) –


These pins are connected to an external oscillator which is generally
a quartz crystal oscillator. They are used to provide an external clock
frequency of 4MHz to 30MHz.

• Pin 20 (GND) –
This pin is connected to the ground. It has to be provided with 0V
power supply. Hence it is connected to the negative terminal of the
power supply.

• Pin 21 to Pin 28 (Port 2) –


Pin 21 to pin 28 are port 2 pins also referred to as P2.0 to P2.7. When
additional external memory is interfaced with the 8051
microcontroller, pins of port 2 act as higher-order address bytes.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge
These pins thatare bidirectional.
you have read and understood our Cookie Policy & Privacy Policy

Got It !

3 of 9 05-09-2022, 19:54
Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.org/pin-diagram-of-8051-microcontroller/

• Pin 29 (PSEN) –
Start PSEN
Yourstands
Coding Journey Now! Login Register
for Program Store Enable. It is output, active-low pin.
This is used to read external memory. In 8031 based system where
external ROM holds the program code, this pin is connected to the OE
pin of the ROM.

• Pin 30 (ALE/ PROG) –


ALE stands for Address Latch Enable. It is input, active-high pin. This
pin is used to distinguish between memory chips when multiple
memory chips are used. It is also used to de-multiplex the
multiplexed address and data signals available at port 0.
During flash programming i.e. Programming of EPROM, this pin acts
as program pulse input (PROG).

• Pin 31 (EA/ VPP) –


EA stands for External Access input. It is used to enable/disable
external memory interfacing. In 8051, EA is connected to Vcc as it
comes with on-chip ROM to store programs. For other family
members such as 8031 and 8032 in which there is no on-chip ROM,
the EA pin is connected to the GND.

• Pin 32 to Pin 39 (Port 0) –


Pin 32 to pin 39 are port 0 pins also referred to as P0.0 to P0.7. They
are bidirectional input/output pins. They don’t have any internal pull-
ups. Hence, 10 K? pull-up registers are used as external pull-ups.
Port 0 is also designated as AD0-AD7 because 8051 multiplexes
address and data through port 0 to save pins.

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge
• Pin 40 (VCC) that you–have read and understood our Cookie Policy & Privacy Policy

This pin provides power supply


Gotvoltage
It ! i.e. +5 Volts to the circuit.

4 of 9 05-09-2022, 19:54
Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.org/pin-diagram-of-8051-microcontroller/

Start Your Coding Journey Now! Login Register

Like 16

Next

Introduction to 8051
Microcontroller

R ECO M M E N D E D A RT I C L E S Page : 1 2 3

01 Introduction to 8051
Microcontroller
05 Pin diagram of 8086
microprocessor
28, May 20 29, May 18

02 External
We use cookies Memory
to ensure you
8051 Microcontroller
that you have
Interfacing
have the best
read and
in
understood our06
browsing experience
Comparison of 8051 with its
on our website. By using our site, you acknowledge
Cookie Policy & Privacy Policy
other family members
01, Jul 21
Got It ! 20, Jun 20

5 of 9 05-09-2022, 19:54
Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.org/pin-diagram-of-8051-microcontroller/

03 Addition of Two 8 Bit Numbers


in 8051 Microcontroller Using 07 Difference between 8051 and
Ports PIC
03, Oct 20
18, Feb 22

04 Pin diagram of 8085


microprocessor
08 Arithmetic instructions in AVR
microcontroller
28, May 18 10, Sep 20

Article Contributed By :

vanshikamunjal80
@vanshikamunjal80

Vote for di�culty


Current di�culty : Medium

Easy Normal Medium Hard Expert

Article Tags : microprocessor, system-programming,


Computer Organization and Architecture

Practice Tags : microprocessor

Improve Article Report Issue

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge
that you have read and understood our Cookie Policy & Privacy Policy

Got It !

6 of 9 05-09-2022, 19:54
Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.org/pin-diagram-of-8051-microcontroller/

Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.

Load Comments

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge
that you have read and understood our Cookie Policy & Privacy Policy

Got It !

7 of 9 05-09-2022, 19:54
Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.org/pin-diagram-of-8051-microcontroller/

A-143, 9th Floor, Sovereign Corporate Tower,


Sector-136, Noida, Uttar Pradesh - 201305

[email protected]

Company Learn
About Us Algorithms

Careers Data Structures

In Media SDE Cheat Sheet

Contact Us Machine learning

Privacy Policy CS Subjects

Copyright Policy Video Tutorials

Courses

News Languages
Python
Top News
Java
Technology
CPP
Work & Career
Golang
Business
C#
Finance
SQL
Lifestyle
Kotlin
Knowledge

Web Development Contribute


Web Tutorials Write an Article
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge
Django Tutorial Improve an Article
that you have read and understood our Cookie Policy & Privacy Policy
HTML Pick Topics to Write
Got It !

JavaScript Write Interview Experience

8 of 9 05-09-2022, 19:54
Pin diagram of 8051 Microcontroller - GeeksforGeeks https://www.geeksforgeeks.org/pin-diagram-of-8051-microcontroller/

JavaScript Write Interview Experience

Bootstrap Internships

ReactJS Video Internship

NodeJS

@geeksforgeeks , Some rights reserved

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge
that you have read and understood our Cookie Policy & Privacy Policy

Got It !

9 of 9 05-09-2022, 19:54

You might also like