0% found this document useful (0 votes)
35 views2 pages

8051 Microcontroller Pin Diagram

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

8051 Microcontroller Pin Diagram

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Pin Diagram of 8051 Microcontroller

Pins for Power Supply


- Pin 40 (Vcc): Provides the power supply to the microcontroller. The typical voltage is
+5V.
- Pin 20 (GND): Ground pin, connected to 0V.

Pins for Oscillator/Clock


- Pin 18 (XTAL2) and Pin 19 (XTAL1):
- These pins are connected to an external quartz crystal oscillator to provide the clock
signal for the microcontroller.
- The frequency is typically 11.0592 MHz for standard applications.

Input/Output Ports
The 8051 has 4 parallel I/O ports (P0, P1, P2, P3), each with 8 pins, making a total of 32
I/O lines.

- Port 0 (Pins 32-39):


- Dual-purpose pins: Used as a general-purpose I/O port or as a multiplexed low-order
address and data bus during external memory access.
- Requires external pull-up resistors when used as I/O pins.

- Port 1 (Pins 1-8):


- Purely for general-purpose input/output.
- Does not require external pull-up resistors.

- Port 2 (Pins 21-28):


- Dual-purpose pins: Used as a general-purpose I/O port or as a high-order address bus
during external memory access.

- Port 3 (Pins 10-17):


- Multi-functional pins with specific alternate functions:
- P3.0 (Pin 10): RXD (Serial Input)
- P3.1 (Pin 11): TXD (Serial Output)
- P3.2 (Pin 12): INT0 (External Interrupt 0)
- P3.3 (Pin 13): INT1 (External Interrupt 1)
- P3.4 (Pin 14): T0 (Timer 0 Input)
- P3.5 (Pin 15): T1 (Timer 1 Input)
- P3.6 (Pin 16): WR (Write Control for External Memory)
- P3.7 (Pin 17): RD (Read Control for External Memory)

Control Pins
- Pin 9 (RST):
- Reset input. A high pulse on this pin resets the microcontroller and restarts program
execution.

- Pin 29 (PSEN - Program Store Enable):


- Used to enable external program memory. It is active-low.

- Pin 30 (ALE - Address Latch Enable):


- Used to demultiplex the address/data bus in case of external memory access.

- Pin 31 (EA - External Access Enable):


- When connected to GND, the microcontroller fetches code from external memory.
- When connected to Vcc, it uses the internal memory.

Pin Diagram Summary


Pin Symbol Function
1-8 P1.0-P1.7 Port 1: General-purpose
I/O pins
9 RST Reset: Resets the
microcontroller
10-17 P3.0-P3.7 Port 3: I/O or alternate
functions (UART, Timer,
etc.)
18, 19 XTAL2, XTAL1 Oscillator pins for external
crystal
20 GND Ground
21-28 P2.0-P2.7 Port 2: I/O or high-order
address bus
29 PSEN Program Store Enable for
external memory access
30 ALE Address Latch Enable
31 EA External Access Enable
32-39 P0.0-P0.7 Port 0: I/O or multiplexed
low-order address/data bus
40 Vcc Power supply (+5V)

You might also like