0% found this document useful (0 votes)
2 views8 pages

lect5

The document discusses the features and specifications of 8-bit microcontrollers (MCUs), particularly the 8051 model, highlighting their low cost, power efficiency, and significant advancements in processing speed. It details the architecture and pin configuration of the 8051 MCU, including its I/O ports and alternate functions. The 8051 remains a crucial component in the automotive industry, demonstrating its value in smart product control functions.

Uploaded by

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

lect5

The document discusses the features and specifications of 8-bit microcontrollers (MCUs), particularly the 8051 model, highlighting their low cost, power efficiency, and significant advancements in processing speed. It details the architecture and pin configuration of the 8051 MCU, including its I/O ports and alternate functions. The 8051 remains a crucial component in the automotive industry, demonstrating its value in smart product control functions.

Uploaded by

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

lect 5 4/19/2025

8-bit MCU
• Low cost
• Inexpensive development software
• Low Power Design

• Although high-end processors, especially 32-bit MCUs, tend to be the center


of attention these days, 8-bit MCUs are more than holding their own.
• The 8-bit MCU continues to be the workhorse of the automotive industry.
• It is valued because of its cost-effective control functions, which enable
consumers to enjoy the benefits of smart products in the automobile sector.
• For example, the BMW 745i luxury sedan contains more than sixty 8-bit
MCUs.
• Enhanced architectures combined with process portability have improved
8-bit MCUs from 100,000 instructions per second in the 1980s to more than
100 million instructions per seconds today-a thousand fold increase

8051 Basic Component

• 4K bytes internal ROM


• 128 bytes internal RAM
• Four 8-bit I/O ports (P0 - P3).
• Two 16-bit timers/counters
• One serial interface
• 64k external memory for code
• 64k external memory for data
• 210 bit addressable
Microcontroller

1
lect 5 4/19/2025

8051 PIN DIAGRAM

8051
Schematic Pin out

P1.0 1 40 Vcc
P1.1 2 39 P0.0(AD0)
P1.2 3 38 P0.1(AD1)
-The 8051 is a 40 pin P1.3 4 37 P0.2(AD2)
device, but out of these P1.4 5 36 P0.3(AD3)
P1.5 6 35 P0.4(AD4)
40 pins, 32 are used for P1.6 7 34 P0.5(AD5)
I/O. P1.7
RST
8
9
8051 33
32
P0.6(AD6)
P0.7(AD7)
(RXD)P3.0 10 (8031) 31 EA/VPP
-24 of these are dual (TXD)P3.1 11 30 ALE/PROG
purpose, i.e. they can (INT0)P3.2 12
(8751) 29 PSEN
operate as I/O (INT1)P3.3 13 (8951) 28 P2.7(A15)
or a control line (T0)P3.4 14 27 P2.6(A14)
or as part of address (T1)P3.5 15 26 P2.5(A13)
or date bus. (WR)P3.6 16 25 P2.4(A12)
(RD)P3.7 17 24 P2.3(A11)
XTAL2 18 23 P2.2(A10)
XTAL1 19 22 P2.1(A9)
GND 20 21 P2.0(A8)

2
lect 5 4/19/2025

IMPORTANT PINS (I/O Ports)

One of the most useful features of the 8051 is that it contains four I/O ports (P0 - P3)
Each port can be used as input or output (bi-direction)

Port 0
pins 32-39 (P0.0-P0.7)
• 8-bit R/W - General Purpose
I/O
• Or acts as a multiplexed low
byte address and data bus for
external memory design

IMPORTANT PINS (I/O Ports)

Port 1
pins 1-8 (P1.0-P1.7)
• Only 8-bit R/W - General
Purpose I/O

3
lect 5 4/19/2025

IMPORTANT PINS (IO Ports)

Port 2
• pins 21-28 (P2.0-P2.7)
• 8-bit R/W - General
Purpose I/O
• Or high byte of the
address bus for external
memory design

IMPORTANT PINS (IO Ports)

Port 3
pins 10-17 (P3.0-P3.7)
• General Purpose I/O
• if not using any of the internal
peripherals (timers) or external
interrupts.

4
lect 5 4/19/2025

Port 3 Alternate Functions

IMPORTANT PINS
• PSEN (out): Program Store Enable, the read signal for external program memory (active
low).
• This is an output pin and is connected to the OE pin of the ROM.

• EA (in): External Access Enable, active low to access external program memory locations
0 to 4K
• There is no on-chip ROM in 8031 and 8032, the EA pin is connected to GND to
indicate the code is stored externally.
• PSEN & ALE are used for external ROM.
• For 8051, EA pin is connected to Vcc.

• ALE (out): Address Latch Enable, to latch address outputs at Port0 and Port2
• It is an output pin and is active high.
• 8051 port 0 provides both address and data.
• The ALE pin is used for de-multiplexing the address and data by connecting to the G
pin of the 74LS373 latch.

5
lect 5 4/19/2025

IMPORTANT PINS

• Vcc (pin 40)


• Vcc provides supply voltage to the chip.
• The voltage source is +5V.

• GND (pin 20)


ground

• XTAL1 & XTAL2: Crystal inputs for internal oscillator.

• XTAL1 and XTAL2 (pins 19 & 18)


• These 2 pins provide external clock.
• Way 1:using a quartz crystal oscillator
• Way 2:using a TTL oscillator

XTAL Connection to 8051

• Using a quartz crystal oscillator


• We can observe the frequency on the XTAL2 pin.
C2
XTAL2
30pF

C1
XTAL1
30pF

GND

6
lect 5 4/19/2025

XTAL Connection to an External Clock Source

• Using a TTL oscillator


• XTAL2 is unconnected.

NC XTAL2

EXTERNAL
OSCILLATOR XTAL1
SIGNAL

GND

IMPORTANT PINS

• RST (pin 9)reset


• input pin and active high( normally low).
• The high pulse must be high at least 2 machine cycles.
• power-on reset.
• Upon applying a high pulse to RST, the
microcontroller will reset and all values in registers
will be lost.
• Reset values of some 8051 registers
• power-on reset circuit

7
lect 5 4/19/2025

“Original” 8051 Microcontroller


Oscillator 4096 Bytes 128 Bytes Two 16 Bit
and timing Program Memory Data Memory Timer/Event
(ROM) (RAM) Counters

8051 Internal data bus


CPU

64 K Byte Bus Programmable Programmable


Expansion I/O Serial Port Full
Control Duplex UART
Synchronous Shifter
subsystem interrupts

External interrupts Control Parallel ports Serial Output


Address Data Bus Serial Input
I/O pins

You might also like