11/21/2015 Rahul(13ec029) 1
CONTENTS
• Introduction.
• Microcontroller vs Microprocessor.
• Architecture.
• Pin diagram.
• Pin configuration.
• Memory Organisation.
• Timers.
• Interrupts.
11/21/2015 Rahul(13ec029) 2
• Serial Communication.
• Interfacing.
a) +5 volt power supply.
b) switch interfacing.
c) LED interfacing.
d) 7-Segment display interfacing.
e) LCD interfacing.
f) ADC interfacing.
g) keypad interfacing.
h) relay interfacing.
• Applications.
11/21/2015 Rahul(13ec029) 3
INTRODUCTION
• A single chip computer or A CPU with all
the peripherals like RAM, ROM, I/O, Timers,
ADCs, etc on the same chip.
OR
• A microcontroller is meant to be more self-
- contained and independent, and functions
as a tiny, dedicated computer.
11/21/2015 Rahul(13ec029) 4
FEATURES OF 8051
• useful for small computing tasks.
• adequate for many control and monitoring
application.
• packaging(RAM,ROM,Timers on-chip).
• Less power consumption.
• Easily upgradable.
• Cost per unit is less.
• Availability of tools of microcontroller
such as proteus(simulator) and keil(compiler).
11/21/2015 Rahul(13ec029) 5
MICROPROCESSOR vs
• General purpose device.
• do not contain on-chip
I/O ports, Timers, ADC
Memory etc.
• used as CPU in computer.
• design is complex and
expensive.
• it has zero status flag.
MICROCONTROLLER
• single chip computer.
• it includes RAM ,ROM
,Timers, ADC, DAC,
interrupts etc.
• performs control oriented
applications.
• simple and less expensive
• it has no zero flag.
11/21/2015 Rahul(13ec029) 6
TYPES OF ARCHITECTURES
1) Von-Neumann Architecture
 only one bus.
 used for both data transfer and instruction fetches.
 cannot be performed at same time.
2) Harvard Architecture
 Separate data and instruction buses.
 Transfers to be performed simultaneously on both
buses.
11/21/2015 Rahul(13ec029) 7
ARCHITECTURE
11/21/2015 Rahul(13ec029) 8
PIN DIAGRAM
11/21/2015 Rahul(13ec029) 9
PIN CONFIGURATION
 ALE/PROG-: when this pin is high it latches the
low byte of the address during accesses to external
memory. This pin is low during EPROM
programming.
 PSEN-: Program Store Enable is the read strobe to
external program memory.
 EA/VPP-: This pin is an active low pin connected
to ground when microcontroller is accessing the
program code stored in the external memory and
connected to Vcc when it is accessing the program code
in the on chip memory.
11/21/2015 Rahul(13ec029) 10
PIN CONFIGURATION
 RST -: applying a high pulse to this pin, the
microcontroller will reset and terminate all activities.
 PORT 0 to 3 -: These are 8-bit bidirectional I/O
port. Port 0 does not contain any internal pull-ups.
Alternate function of port 3are RxD, TxD, INT0,
INT1,T0,T1,WR,RD.
 XTAL1 & XTAL2 -: connected to oscillator
amplifier.
 VCC-: Supply voltage.
 VSS-: Circuit ground potential.
11/21/2015 Rahul(13ec029) 11
MEMORY ORGANISATION
• Code Memory.
• External RAM.
• On-Chip Memory.
• Internal RAM.
• Special Function Register.
• Machine Cycle.
11/21/2015 Rahul(13ec029) 12
Code Memory
 holds the actual 8051 program.
 limited to 64K.
 may be both internal or external.
External RAM
 slow accessing speed.
 it gains in quantity.
 limited to 64K.
11/21/2015 Rahul(13ec029) 13
On-Chip Memory
 It refers to that memory that physically exists
on the microcontroller itself.
 Two types-
a) Internal RAM.
b) SFR(Special Function Register.)
 Total 256 bytes.
 Equal memory for RAM and SFR i,e 128bytes.
11/21/2015 Rahul(13ec029) 14
11/21/2015 Rahul(13ec029) 15
SPECIAL FUNCTION REGISTER
 Accumulator.
 B Register.
 Program Status Word.
 Stack Pointer.
 Data Pointer.
 Ports 0 to 3.
 Timer Registers.
 Control Register.
11/21/2015 Rahul(13ec029) 16
+5 VOLT POWER SUPPLY
11/21/2015 Rahul(13ec029) 17
SWITCH INTERFACING
11/21/2015 Rahul(13ec029) 18
LED INTERFACING
11/21/2015 Rahul(13ec029) 19
7 SEGMENT INTERFACING
11/21/2015 Rahul(13ec029) 20
LCD INTERFACING
11/21/2015 Rahul(13ec029) 21
RELAY INTERFACING
11/21/2015 Rahul(13ec029) 22
ADC INTERFACING
11/21/2015 Rahul(13ec029) 23
MATRIX KEYPAD INTERFACING
11/21/2015 Rahul(13ec029) 24
APPLICATION OF 8051
 Automobile.
 Rail Transport.
 Industrial Processing.
 Remote sensing.
 Robotics.
 Consumer electronics.
 Security(e-commerce and smart cards).
 Medical.
 Defense application.
11/21/2015 Rahul(13ec029) 25
11/21/2015 Rahul(13ec029) 26

8051 Microcontroller ppt

  • 1.
  • 2.
    CONTENTS • Introduction. • Microcontrollervs Microprocessor. • Architecture. • Pin diagram. • Pin configuration. • Memory Organisation. • Timers. • Interrupts. 11/21/2015 Rahul(13ec029) 2
  • 3.
    • Serial Communication. •Interfacing. a) +5 volt power supply. b) switch interfacing. c) LED interfacing. d) 7-Segment display interfacing. e) LCD interfacing. f) ADC interfacing. g) keypad interfacing. h) relay interfacing. • Applications. 11/21/2015 Rahul(13ec029) 3
  • 4.
    INTRODUCTION • A singlechip computer or A CPU with all the peripherals like RAM, ROM, I/O, Timers, ADCs, etc on the same chip. OR • A microcontroller is meant to be more self- - contained and independent, and functions as a tiny, dedicated computer. 11/21/2015 Rahul(13ec029) 4
  • 5.
    FEATURES OF 8051 •useful for small computing tasks. • adequate for many control and monitoring application. • packaging(RAM,ROM,Timers on-chip). • Less power consumption. • Easily upgradable. • Cost per unit is less. • Availability of tools of microcontroller such as proteus(simulator) and keil(compiler). 11/21/2015 Rahul(13ec029) 5
  • 6.
    MICROPROCESSOR vs • Generalpurpose device. • do not contain on-chip I/O ports, Timers, ADC Memory etc. • used as CPU in computer. • design is complex and expensive. • it has zero status flag. MICROCONTROLLER • single chip computer. • it includes RAM ,ROM ,Timers, ADC, DAC, interrupts etc. • performs control oriented applications. • simple and less expensive • it has no zero flag. 11/21/2015 Rahul(13ec029) 6
  • 7.
    TYPES OF ARCHITECTURES 1)Von-Neumann Architecture  only one bus.  used for both data transfer and instruction fetches.  cannot be performed at same time. 2) Harvard Architecture  Separate data and instruction buses.  Transfers to be performed simultaneously on both buses. 11/21/2015 Rahul(13ec029) 7
  • 8.
  • 9.
  • 10.
    PIN CONFIGURATION  ALE/PROG-:when this pin is high it latches the low byte of the address during accesses to external memory. This pin is low during EPROM programming.  PSEN-: Program Store Enable is the read strobe to external program memory.  EA/VPP-: This pin is an active low pin connected to ground when microcontroller is accessing the program code stored in the external memory and connected to Vcc when it is accessing the program code in the on chip memory. 11/21/2015 Rahul(13ec029) 10
  • 11.
    PIN CONFIGURATION  RST-: applying a high pulse to this pin, the microcontroller will reset and terminate all activities.  PORT 0 to 3 -: These are 8-bit bidirectional I/O port. Port 0 does not contain any internal pull-ups. Alternate function of port 3are RxD, TxD, INT0, INT1,T0,T1,WR,RD.  XTAL1 & XTAL2 -: connected to oscillator amplifier.  VCC-: Supply voltage.  VSS-: Circuit ground potential. 11/21/2015 Rahul(13ec029) 11
  • 12.
    MEMORY ORGANISATION • CodeMemory. • External RAM. • On-Chip Memory. • Internal RAM. • Special Function Register. • Machine Cycle. 11/21/2015 Rahul(13ec029) 12
  • 13.
    Code Memory  holdsthe actual 8051 program.  limited to 64K.  may be both internal or external. External RAM  slow accessing speed.  it gains in quantity.  limited to 64K. 11/21/2015 Rahul(13ec029) 13
  • 14.
    On-Chip Memory  Itrefers to that memory that physically exists on the microcontroller itself.  Two types- a) Internal RAM. b) SFR(Special Function Register.)  Total 256 bytes.  Equal memory for RAM and SFR i,e 128bytes. 11/21/2015 Rahul(13ec029) 14
  • 15.
  • 16.
    SPECIAL FUNCTION REGISTER Accumulator.  B Register.  Program Status Word.  Stack Pointer.  Data Pointer.  Ports 0 to 3.  Timer Registers.  Control Register. 11/21/2015 Rahul(13ec029) 16
  • 17.
    +5 VOLT POWERSUPPLY 11/21/2015 Rahul(13ec029) 17
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
    APPLICATION OF 8051 Automobile.  Rail Transport.  Industrial Processing.  Remote sensing.  Robotics.  Consumer electronics.  Security(e-commerce and smart cards).  Medical.  Defense application. 11/21/2015 Rahul(13ec029) 25
  • 26.