Description of each pin is discussed here:
•VCC → 5V supply
• VSS → GND
• XTAL2/XTALI are for oscillator input
• Port 0 – 32 to 39 – AD0/AD7 and P0.0 to P0.7
• Port 1 – 1 to 8 – P1.0 to P1.7
• Port 2 – 21 to 28 – P2.0 to P2.7 and A 8 to A15
• Port 3 – 10 to 17 – P3.0 to P3.7
• P 3.0 – RXD – Serial data input – SBUF
• P 3.1 – TXD – Serial data output – SBUF
• P 3.2 –INT0– External interrupt 0 – TCON 0.1
• P 3.3 –INT1– External interrupt 1 – TCON 0.3
• P 3.4 – T0 – External timer 0 input – TMOD
• P 3.5 – T1 – External timer 1 input – TMOD
• P 3.6 –WR– External memory write cycle – Active LOW
• P 3.7 –RD– External memory read cycle – Active LOW
• RST – for Restarting 8051
• ALE – Address latch enable
1 – Address on AD 0 to AD 7
0 – Data on AD 0 to AD 7
• PSEN – Program store enable