0% found this document useful (0 votes)
14 views5 pages

Unit 5 MM

Uploaded by

sahilpatilarts77
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)
14 views5 pages

Unit 5 MM

Uploaded by

sahilpatilarts77
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/ 5

UNIT 5

Introduction to 8051 microcontroller


Comparison of microprocessor and microcontroller-

Microprocessor Microcontroller
Parameter

Microprocessors can Microcontrollers can be


be understood as the understood as the
Definition
heart of a computer heart of an embedded
system. system.

A microprocessor is a A microcontroller is a
processor where the controlling device
memory and I/O wherein the memory
What is it?
component are and I/O output
connected externally. component are present
internally.

The circuit is complex Microcontrollers are


Circuit due to external present on chip
complexity connection. memory. The circuit is
less complex.

Memory The memory and I/O The memory and I/O


and I/O components are to be components are
componen connected externally. available.
ts

Compact Microprocessors can’t Microcontrollers can be


system be used in compact used with a compact
compatibil system. system.
ity

Microprocessors are Microcontrollers are


Efficiency
not efficient. efficient.

Zero Microprocessors have Microcontroller doesn’t


status flag a zero status flag. have a zero status flag.

Microprocessors have Microcontrollers have


Number of
less number of more number of
registers
registers. registers.
Microprocessors are Microcontrollers are
Applicatio generally used in generally used in
ns personal computers. washing machines, and
air conditioners.
Microcontroller Architecture-

1. It is an 8-bit microcontroller.
2. It is built with 40 pins DIP (dual inline package), 4kb of ROM storage and 128 bytes
of RAM storage, 2 16-bit timers.
3. It consists of are four parallel 8-bit ports, which are programmable as well as
addressable as per the requirement.
4. An on-chip crystal oscillator is integrated in the microcontroller having crystal
frequency of 12 MHz.
5. Let us now discuss the architecture of 8051 Microcontroller.
6. In the following diagram, the system bus connects all the support devices to the CPU.
7. The system bus consists of an 8-bit data bus, a 16-bit address bus and bus control
signals.
8. All other devices like program memory, ports, data memory, serial interface, interrupt
control, timers, and the CPU are all interfaced together through the system bus.

SPECIAL FUNCTION REGISTERS (SFRs):


In 8051 microcontroller there certain registers which uses the RAM addresses from 80h to FFh and
they are meant for certain specific operations.

These registers are called Special function registers (SFRs).

Some of these registers are bit addressable also.

The list of SFRs and their functional names are given below.

In these SFRs some of them are related to I/O ports (P0, P1, P2 and P3) and some of them are meant
for control operations (TCON,SCON, PCON..) and remaining are the auxiliary SFRs, in the sense that
they don't directly configure the 8051.

Microcontrollers 8051 Input Output Ports-


8051 microcontrollers have 4 I/O ports each of 8-bit, which can be configured as
input or output. Hence, total 32 input/output pins allow the microcontroller to be
connected with the peripheral devices.

 Pin configuration i.e. the pin can be configured as 1 for input and 0 for
output as per the logic state.

o Input/Output (I/O) pin − All the circuits within the microcontroller


must be connected to one of its pins except P0 port because it does
not have pull-up resistors built-in.
o Input pin − Logic 1 is applied to a bit of the P register. The output
FE transistor is turned off and the other pin remains connected to the
power supply voltage over a pull-up resistor of high resistance.

 Port 0 − The P0 (zero) port is characterized by two functions −


o When the external memory is used then the lower address byte
(addresses A0A7) is applied on it, else all bits of this port are
configured as input/output.
o When P0 port is configured as an output then other ports consisting of
pins with built-in pull-up resistor connected by its end to 5V power
supply, the pins of this port have this resistor left out.

Microcontrollers - 8051 Pin Description-


The pin diagram of 8051 microcontroller looks as follows −

 Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other
functions. It is internally pulled up, bi-directional I/O port.
 Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial
values.
 Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like
interrupts, timer input, control signals, serial communication signals RxD and TxD,
etc.
 Pins 18 & 19 − These pins are used for interfacing an external crystal to get the
system clock.
 Pin 20 − This pin provides the power supply to the circuit.
 Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order
address bus signals are also multiplexed using this port.
 Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a
signal from the external program memory.
 Pin 30 − This is EA pin which stands for External Access input. It is used to
enable/disable the external memory interfacing.
 Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to
demultiplex the address-data signal of port.
 Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order
address and data bus signals are multiplexed using this port.
 Pin 40 − This pin is used to provide power supply to the circuit.

You might also like