3. Pin Description
• Pin 1-8(port 1,p1.0 to p1.7): These are 8 pins of
port 1. Each of these pins can be configured as
input or output.
• Pin 9(Reset): A positive voltage pulse on this pin
resets the microcontroller.
• Pin 10-17(Port3, P3.3 to P3.7): these are dual
function pins. Similar to port 1, each of these pins
can serve as universal input or output.
4. • Pin 18,19 (X1 ,X2): These are the input and
output pins of internal oscillator. A quartz crystal is
usually connected to these pins.
• These 2 pins provide external clock.
• Way 1:using a quartz crystal oscillator
• Way 2:using a TTL oscillator
• Pin 20(GND): Ground
• Pin 21-28(Port2,P2.0 to P2.7): If there is no
intention to use external memory then these port
pins are configured as universal input/output. In
case external memory is used then the higher
address byte ie address A8-A15 will appear on this
port.
5. Pins of 8051(1/4)
• Vcc(pin 40):
• Vcc provides supply voltage to the chip.
• The voltage source is +5V.
• Pin 12(INT0): Interrupt 0 input
• Pin 13(INT1): Interrupt 1 input
• Pin 13(T0): Counter 0 clock input
• Pin 14(T1): Counter 1 clock input
• Pin 15(WR): Signal for writing to external
additional RAM
• Pin 16(RD): Signal for reading from external Ram.
6. Pins of 8051(3/4)
• /EA(pin 31)
• By applying logic 0 to this pin ,P2 and P3 are
used for data and address transmission with no
regards to whether there is internal memory or
not. Otherwise by applying logic 1bto EA pin,
the microcontroller will use both memories, first
internal and afterwards external (if exists) .
• PSEN(pin 29):program store enable
• If external Rom is used for storing program then
it has logic 0 value every time the
microcontroller reads a byte from memory.
7. Pins of 8051
• ALE(pin 30):address latch enable
• It is an output pin and is active high.
• This pin is used when multiple memory chips are
connected to the controller and only one of them needs
to be selected.