Professional Documents
Culture Documents
8051 is available in a 40-pin plastic and DIP package. The pin diagram is shown below.
̅̅̅̅
𝐸𝐴/𝑉𝑃𝑃 External Access/ Programming Voltage
This is a low active input signal. When the pin is grounded, microcontroller
ignores the on-chip ROM and starts execution from external ROM. When input is
high, program execution starts from internal ROM and after that it executes from
external ROM. When external ROM is not present, it is connected to +5V supply.
This pin is connected to 21V during programming of the chip.
̅̅̅̅̅̅̅̅
𝑷𝑺𝑬𝑵 Program Store Enable
This is a low active output signal. This signal goes low when the microcontroller
read an instruction from external ROM. So, this pin is connected to ̅̅̅̅
𝑂𝐸 (Output
Enable) of external ROM and used as read stobe for external ROM..
IO Ports:
• 32 IO lines are available in 8051.
• The lines are arranged as four 8-bit IO ports.
• Ports are bit as well as byte addressable. Individual pin can be used as IO lines or can be
used as 8-bit port for parallel data transfer.
• Each port line consists of a latch and a driver.
• Due to fixed load or pull up resistor, maximum current a port can deliver (source) is
5mA.
• The maximum input current a port pin can sink (draw) is tens of micro-ampere.
• The sink current is quite more than sourcing current.
• To configure an input lines line as input, its latch must be written with bit 1.
• When used as output line, the data is written to the corresponding latch.
• When used as input lines, status of IO pin is read.
• When some specific features of processor are used, ports may be used for some
alternate function and at that case that lines can’t be used as io lines
• Port-0 has an open drain output (for io
operations), whereas other ports have internal
pull up resistor.
• So, pull up registers of 10kΩ are connected
externally to the pins as shown in the figure.
• PORT0 and PORT2 are also used to interface
external memory. In such case external pull up
resistors are not required for PORT-0.
• PORT3 is used for control signal generation, serial
communication, timer input and external interrupt purpose.