SlideShare ist ein Scribd-Unternehmen logo
1 von 94
MICROCONTROLLER-8051 Features & Applications Dr. Y .Narasimha  Murthy  Ph.D., Sri Saibaba National College (Autonomous) ANANTAPUR-515001(A.P)
[object Object],[object Object],[object Object],[object Object],[object Object]
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],Why do  we need to learn Microcontrollers ?
[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object]
Then What is a Microcontroller ?   ,[object Object],[object Object],[object Object],RAM ROM I/O Port Timer Serial COM Port CPU A single chip Microcontroller
How is it different from a Microprocessor ?? ,[object Object],CPU for Computers No RAM, ROM, I/O on CPU chip itself Example : Intel’s x86, Motorola’s 680x0 CPU General-Purpose Micro-processor RAM ROM I/O Port Timer Serial COM Port Data Bus Address Bus
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Microprocessor vs. Microcontroller
EVOLUTION   ,[object Object],[object Object],[object Object],[object Object]
Evolution  contd … ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
ARM Controllers ,[object Object]
Types of  Microcontrollers
Microcontrollers from different manufacturers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MCS-51 “Family” of Microcontollers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Microcontroller Architectures CPU Program + Data Address Bus Data Bus Memory Von Neumann Architecture CPU Program Address Bus Data Bus Harvard Architecture Memory Data Address Bus Fetch Bus 0 0 0 2 n
Important Features of 8051 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
“Original” 8051 Microcontroller Oscillator and timing 4096 Bytes  Program Memory (ROM) 128 Bytes Data  Memory (RAM) Two 16 Bit Timer/Event Counters 8051 CPU 64 K Byte Bus Expansion Control Programmable I/O Programmable Serial Port Full Duplex UART Synchronous Shifter Internal data bus External interrupts subsystem interrupts Control Parallel ports Address Data Bus I/O pins Serial Input Serial Output
[object Object],[object Object],Pin Description of the 8051
8051 CPU Registers A ( 8-bit Accumulator ) B  ( 8-bit register for Mul &Div ) PSW ( 8-bit Program Status Word ) SP (8-bit  Stack Pointer ) PC (16-bit  Program Counter ) DPTR (16-bit  Data Pointer )
Special Function Registers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Addresses 80h – FFh Direct Addressing is used to access SFRs
List of Registers (*Denotes the SFRs)
Contd…
PSW REGISTER
Memory mapping in 8051  ROM memory map in 8051 family 4k DS5000-32 8k 32k from Atmel Corporation from Dallas Semiconductor 0000H 0FFFH 0000H 1FFFH 0000H 7FFFH 8051 8752
RAM memory space allocation in the 8051 7FH 30H 2FH 20H 1FH 17H 10H 0FH 07H 08H 18H 00H Register Bank 0 (Stack)  Register Bank 1  Register Bank 2 Register Bank 3 Bit-Addressable RAM Scratch pad RAM
PORTS OF 8051 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Port 0 with Pull-Up Resistors
[object Object],[object Object],Ports….
Ports contd… ,[object Object],[object Object],[object Object]
Alternate functions of P3
I/O Port structure ,[object Object],[object Object],[object Object]
I/O Port contd…
Timers /Counters   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Timer  ,[object Object],[object Object],[object Object],[object Object],to LCD P1 8051 TL0 TH0 P2 Set Timer 0
Counter ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],T0 to LCD P3.4 P1 8051 a switch TL0 TH0
Registers   Used in Timer/Counter ,[object Object],[object Object],[object Object],[object Object],[object Object]
TMOD Register ,[object Object],[object Object],[object Object],[object Object],[object Object],GATE C/T M1 M0 GATE C/T M1 M0 Timer 1 Timer 0 (MSB) (LSB)
Gate ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TMod contd…. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TMod contd…
Let us understand the working of Timer Mode 1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Steps of Mode 1   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mode 1 contd… ,[object Object],[object Object],TF = 0 TF = 0 TF = 0 TF = 0 TF = 1 TH0 TL0 Start timer Stop timer Monitor TF until TF=1 TR0=1 TR0=0 TF FFFC FFFD FFFE FFFF 0000
Mode 1  contd… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TCON Register ,[object Object],[object Object],[object Object],[object Object]
Tcon contd… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Equivalent Instructions for the Timer Control Register TCON: Timer/Counter Control Register CLR  TCON.7 = CLR  TF1 SETB TCON.7 = SETB TF1 CLR  TCON.6 = CLR  TR1 SETB TCON.6 = SETB TR1 For timer 1 CLR  TCON.5 = CLR  TF0 SETB TCON.5 = SETB TF0 CLR  TCON.4 = CLR  TR0 SETB TCON.4 = SETB TR0 For timer 0 TF1 IT0 IE0 IT1 IE1 TR0 TF0 TR1
Simple applications using ports &Timers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Square-wave of 66%duty cycle. HERE   : SETB  P1.0  ( Make bit of Port 0 High) LCALL DELAY LCALL DELAY CLR  P1.0 LCALL DELAY SJMP HERE  : Keep doing it
Square-wave generation using Timer DELAY: SETB TR0  ;start the timer 0 AGAIN: JNB TF0,AGAIN  CLR TR0  ;stop timer 0 CLR TF0  ;clear timer 0 flag RET ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
8051- SERIAL COMMUNICATION
Basics of serial communication
Types of Serial communications
RxD and TxD pins in the 8051 ,[object Object],[object Object],[object Object],[object Object]
Interfacing to PC
SCON (Serial control) register
SM0 , SM1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REN ,  TI ,   RI ,[object Object],[object Object],[object Object]
Contd… ,[object Object],[object Object]
8051 Interrupts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Steps in executing an interrupt ,[object Object],[object Object],[object Object],[object Object]
Interrupt Sources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Interrupt Vectors
Interrupt Enable Register   ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Enabling and disabling an interrupt ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],SETB  IE.7 SETB  IE.1 SETB  IE.3 SETB  IE.0 SETB  IE.2   SETB  IE.4
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Interrupt Priorities
Interrupt Priorities (IP) Register ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],--- PX0 PT0 PX1 PT1 PS PT2 ---
Interrupt Priorities Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],--- PX0 PT0 PX1 PT1 PS PT2 ---
Interrupt inside an interrupt ,[object Object],[object Object],[object Object],--- PX0 PT0 PX1 PT1 PS PT2 ---
Applications of  Microcontrollers
Simple Interfacing Examples
Seven segment Interfacing
Traffic light controller
 
Closed loop control system-Temperature control example
 
 
 
 
 
 
 
 
Recent Wonders
Recent Wonders  contd ........
Recent Wonders  contd ........
Books that have helped me to understand the Microcontrollers & embedded systems  ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Useful websites
Useful websites  contd… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Epilogue ,[object Object],[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

8085 microprocessor architecture ppt
8085 microprocessor architecture ppt8085 microprocessor architecture ppt
8085 microprocessor architecture ppt
Parvesh Gautam
 

Was ist angesagt? (20)

3.programmable interrupt controller 8259
3.programmable interrupt controller 82593.programmable interrupt controller 8259
3.programmable interrupt controller 8259
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8051 serial communication-UART
8051 serial communication-UART8051 serial communication-UART
8051 serial communication-UART
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
8085 microprocessor architecture ppt
8085 microprocessor architecture ppt8085 microprocessor architecture ppt
8085 microprocessor architecture ppt
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
 
8051 microcontroller and it’s interface
8051 microcontroller and it’s interface8051 microcontroller and it’s interface
8051 microcontroller and it’s interface
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
UART
UART UART
UART
 
8255
82558255
8255
 
8085-microprocessor
8085-microprocessor8085-microprocessor
8085-microprocessor
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 

Ähnlich wie Microcontroller 8051

Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
Amandeep Alag
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
918007165995
 
8051 microcontroller features
8051 microcontroller features8051 microcontroller features
8051 microcontroller features
Tech_MX
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
eceprinter6
 

Ähnlich wie Microcontroller 8051 (20)

Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
 
8051 microcontroller features
8051 microcontroller features8051 microcontroller features
8051 microcontroller features
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 
janakiraman egsp collage I msc 4 unit
janakiraman egsp collage  I msc 4 unitjanakiraman egsp collage  I msc 4 unit
janakiraman egsp collage I msc 4 unit
 
microcontroller-8051-ppt
 microcontroller-8051-ppt microcontroller-8051-ppt
microcontroller-8051-ppt
 
microcontroller-8051-ppt(1)
microcontroller-8051-ppt(1)microcontroller-8051-ppt(1)
microcontroller-8051-ppt(1)
 
janakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiraman I msc 4 unit
janakiraman I msc 4 unit
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
Microcontroller (1).pptx
Microcontroller (1).pptxMicrocontroller (1).pptx
Microcontroller (1).pptx
 
89s52 2
89s52 289s52 2
89s52 2
 
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
8051
80518051
8051
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 

Microcontroller 8051

Hinweis der Redaktion

  1. Program memory – RAM or ROM? Data memory – RAM or ROM?