SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
8051- Microcontroller Experiments

Exp No: 17

AIM:

        To perform 8 bit arithmetic operations using 8051 microcontroller.
               A) Addition
               B) Subtraction
               C) Multiplication
               D) Division


ADDITION

               MOV R0,#00
               MOV A,#DATA1
               ADD A, #DATA2
               JNC LABEL
               INC R0
LABEL:         MOV DPTR,#4150
               MOVX @DPTR,A
               INC DPTR
               MOV A,R0
               MOVX @DPTR,A
HERE:          SJMP HERE




SUBTRACTION


               CLR C
               MOV B,#00
               MOV A,#DATA1
               SUBB A,#DATA2
               JNC LABEL
               CPL A
               INC A
               INC B
LABEL:         MOV DPTR,#4150
               MOVX @DPTR, A
               INC DPTR
               MOV A,B
               MOVX @DPTR,A
HERE:          SJMP HERE
MULTIPLICATION

           MOV A, #DATA1
           MOV B, A
           MOV A, #DATA2
           MUL AB
           MOV DPTR, #4150
           MOVX @DPTR, A
           INC DPTR
           MOV A, B
           MOVX @DPTR, A
LOOP:      SJMP LOOP


DIVISION


           MOV A, #DATA1
           MOV B,A
           MOV A, #DATA2
           DIV AB
           MOV DPTR, #4150
           MOVX @DPTR, A
           INC DPTR
           MOV A, B
           MOV @DPTR, A
LOOP       SJMP LOOP
EXP NO: 18) INTERFACING OF DAC (Digital to Analog Converter)FOR
GENERATIG WAVEFORMS


18 A) SQUARE WAVE GENERATION

AIM.

        To generate square wave using DAC.



PROGRAM



                            START            MOV DPTR,#FFC8
                                             MOV A,#00
                                             MOVX @DPTR,A
                                             LCALL DELAY
                                             MOV    A,#FF
                                             MOVX @DPTR,A
                                             LCALL DELAY
                                             LJMP   START
                            DELAY            MOV    R1, #05
                            LOOP             MOV R2, #FF
                            HERE             DJNZ   R2, HERE
                                             DJNZ   R1, LOOP
                                             RET
                                             .



18 B) Generation of sawtooth wave

Aim

       To create a sawtooth wave using DAC

Program

                                             MOV DPTR, #FFC8
                                             MOV A,#00
                            LOOP:            MOVX @DPTR,A
                                             INC A
                                             SJMP LOOP
18 C) Generation of triangular wave


AIM

      To generate triangular waveform using DAC.


Program

                                        MOV DPTR, #FFC8
                           START        MOV A, #00
                           LOOP1        MOV @DPTR,A
                                        INC A
                                        JNZ LOOP1
                                        MOV A, #FF
                           LOOP2        MOVX @DPTR,A
                                        DEC A
                                        JNZ LOOP2
                                        LJMP START
Exp No: 19 ) Stepper Motor Interfacing



Aim


To interface the stepper motor with 8051 and run it in clockwise and anticlockwise
directions.


Program


Start: MOV          DPTR,#4500
       MOV          R0,#04H
JO : MOVX           A,@DPTR
       PUSH         DPH
       PUSH         DPL
       MOV          DPTR,#FFC0
       MOV          R2,#04
       MOV          R1,#0F
DLY1: MOV           R3,#0F
DLY: DJNZ           R3,DLY
       DJNZ         R1,DLY1
       DJNZ         R2,DLY1
       MOVX         @DPTR,A
       POP          DPL
       POP          DPH
       INC          DPTR
       DJNZ         R0,JO
       SJMP         START

Address For Clockwise For
        Rotation      Anticlockwise
                      Rotation
4500    08            08

4501      01             02

4502      04             04

4503      02             01
Clock wise                      Anticlock wise
Step A1      A2   B1   B2       Step A1 A2       B1   B2
1     1      0    0    0    8   1     1    0     0    0    8
2     0      0    0    1    1   2     0    0     1    0    2
3     0      1    0    0    4   3     0    1     0    0    4
4     0      0    1    0    2   4     0    0     0    1    1

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
8259 a
8259 a8259 a
8259 a
 
8051-mazidi-solution
8051-mazidi-solution8051-mazidi-solution
8051-mazidi-solution
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
Carry save multiplier
Carry save multiplierCarry save multiplier
Carry save multiplier
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
 
DIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFETDIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFET
 
program status word
program status wordprogram status word
program status word
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
8086 microprocessor lab manual
8086 microprocessor lab manual8086 microprocessor lab manual
8086 microprocessor lab manual
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 
Lambda design rule
Lambda design ruleLambda design rule
Lambda design rule
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051
 
Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Pipelining approach
Pipelining approachPipelining approach
Pipelining approach
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
Solution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidiSolution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidi
 
Stick Diagram
Stick DiagramStick Diagram
Stick Diagram
 

Andere mochten auch

Andere mochten auch (6)

8051 Assembly Language Programming
8051 Assembly Language Programming8051 Assembly Language Programming
8051 Assembly Language Programming
 
Homework 2 sol
Homework 2 solHomework 2 sol
Homework 2 sol
 
List of 8085 programs
List of 8085 programsList of 8085 programs
List of 8085 programs
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
Question paper with solution the 8051 microcontroller based embedded systems...
Question paper with solution  the 8051 microcontroller based embedded systems...Question paper with solution  the 8051 microcontroller based embedded systems...
Question paper with solution the 8051 microcontroller based embedded systems...
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 

Ähnlich wie 8051 experiments1

Microcontroller 8051 soft
Microcontroller 8051  softMicrocontroller 8051  soft
Microcontroller 8051 softbaluusa8
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsNoor Tahasildar
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsnoorahamed tahasildar
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experiments Maicrocontroller lab basic experiments
Maicrocontroller lab basic experiments noorahamed tahasildar
 
Micro Controller lab basic experiments (1)
Micro Controller lab basic experiments (1)Micro Controller lab basic experiments (1)
Micro Controller lab basic experiments (1)Noor Tahasildar
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.pptsteffydean
 
Micro p test
Micro p testMicro p test
Micro p testnurhelmi
 
CoffeeScript for the Rubyist
CoffeeScript for the RubyistCoffeeScript for the Rubyist
CoffeeScript for the RubyistMark
 
CoffeeScript for the Rubyist
CoffeeScript for the RubyistCoffeeScript for the Rubyist
CoffeeScript for the RubyistMark
 
PPI Modes.pptx
PPI Modes.pptxPPI Modes.pptx
PPI Modes.pptxHebaEng
 
Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd
Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd
Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd Technogroovy India
 
Buy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineBuy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineTechnogroovy
 
Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051logesh waran
 
Automatic light project
Automatic light projectAutomatic light project
Automatic light projectkspece0928
 
Microprocessor Week 8: Subroutine
Microprocessor Week 8: Subroutine Microprocessor Week 8: Subroutine
Microprocessor Week 8: Subroutine Arkhom Jodtang
 
Applications of microcontroller(8051)
Applications of microcontroller(8051) Applications of microcontroller(8051)
Applications of microcontroller(8051) vijaydeepakg
 
Programs using Microcontrollers.ppt
Programs using Microcontrollers.pptPrograms using Microcontrollers.ppt
Programs using Microcontrollers.pptSasiBhushan22
 
Https _doc-0o-c4-apps-viewer.googleusercontent
Https  _doc-0o-c4-apps-viewer.googleusercontent Https  _doc-0o-c4-apps-viewer.googleusercontent
Https _doc-0o-c4-apps-viewer.googleusercontent vijaydeepakg
 

Ähnlich wie 8051 experiments1 (20)

3rd
3rd3rd
3rd
 
Microcontroller 8051 soft
Microcontroller 8051  softMicrocontroller 8051  soft
Microcontroller 8051 soft
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experiments Maicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
 
Micro Controller lab basic experiments (1)
Micro Controller lab basic experiments (1)Micro Controller lab basic experiments (1)
Micro Controller lab basic experiments (1)
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.ppt
 
Micro p test
Micro p testMicro p test
Micro p test
 
CoffeeScript for the Rubyist
CoffeeScript for the RubyistCoffeeScript for the Rubyist
CoffeeScript for the Rubyist
 
CoffeeScript for the Rubyist
CoffeeScript for the RubyistCoffeeScript for the Rubyist
CoffeeScript for the Rubyist
 
PPI Modes.pptx
PPI Modes.pptxPPI Modes.pptx
PPI Modes.pptx
 
Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd
Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd
Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd
 
Buy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineBuy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects Online
 
Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051Addressing mode and instruction set using 8051
Addressing mode and instruction set using 8051
 
Automatic light project
Automatic light projectAutomatic light project
Automatic light project
 
Microprocessor Week 8: Subroutine
Microprocessor Week 8: Subroutine Microprocessor Week 8: Subroutine
Microprocessor Week 8: Subroutine
 
Alp 8051
Alp 8051Alp 8051
Alp 8051
 
Applications of microcontroller(8051)
Applications of microcontroller(8051) Applications of microcontroller(8051)
Applications of microcontroller(8051)
 
Programs using Microcontrollers.ppt
Programs using Microcontrollers.pptPrograms using Microcontrollers.ppt
Programs using Microcontrollers.ppt
 
Https _doc-0o-c4-apps-viewer.googleusercontent
Https  _doc-0o-c4-apps-viewer.googleusercontent Https  _doc-0o-c4-apps-viewer.googleusercontent
Https _doc-0o-c4-apps-viewer.googleusercontent
 

Mehr von tt_aljobory (20)

Lecture12
Lecture12Lecture12
Lecture12
 
Lecture11
Lecture11Lecture11
Lecture11
 
Lecture10
Lecture10Lecture10
Lecture10
 
Lecture9
Lecture9Lecture9
Lecture9
 
Lecture7
Lecture7Lecture7
Lecture7
 
Lecture8
Lecture8Lecture8
Lecture8
 
Lecture6
Lecture6Lecture6
Lecture6
 
Lecture5
Lecture5Lecture5
Lecture5
 
Lecture4
Lecture4Lecture4
Lecture4
 
Lecture3
Lecture3Lecture3
Lecture3
 
Lecture2
Lecture2Lecture2
Lecture2
 
Lecture1
Lecture1Lecture1
Lecture1
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Good example on ga
Good example on gaGood example on ga
Good example on ga
 
Lect3
Lect3Lect3
Lect3
 
Lect4
Lect4Lect4
Lect4
 
Lect4
Lect4Lect4
Lect4
 
Above theclouds
Above thecloudsAbove theclouds
Above theclouds
 
Inet prog
Inet progInet prog
Inet prog
 
Form
FormForm
Form
 

Kürzlich hochgeladen

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

8051 experiments1

  • 1. 8051- Microcontroller Experiments Exp No: 17 AIM: To perform 8 bit arithmetic operations using 8051 microcontroller. A) Addition B) Subtraction C) Multiplication D) Division ADDITION MOV R0,#00 MOV A,#DATA1 ADD A, #DATA2 JNC LABEL INC R0 LABEL: MOV DPTR,#4150 MOVX @DPTR,A INC DPTR MOV A,R0 MOVX @DPTR,A HERE: SJMP HERE SUBTRACTION CLR C MOV B,#00 MOV A,#DATA1 SUBB A,#DATA2 JNC LABEL CPL A INC A INC B LABEL: MOV DPTR,#4150 MOVX @DPTR, A INC DPTR MOV A,B MOVX @DPTR,A HERE: SJMP HERE
  • 2. MULTIPLICATION MOV A, #DATA1 MOV B, A MOV A, #DATA2 MUL AB MOV DPTR, #4150 MOVX @DPTR, A INC DPTR MOV A, B MOVX @DPTR, A LOOP: SJMP LOOP DIVISION MOV A, #DATA1 MOV B,A MOV A, #DATA2 DIV AB MOV DPTR, #4150 MOVX @DPTR, A INC DPTR MOV A, B MOV @DPTR, A LOOP SJMP LOOP
  • 3. EXP NO: 18) INTERFACING OF DAC (Digital to Analog Converter)FOR GENERATIG WAVEFORMS 18 A) SQUARE WAVE GENERATION AIM. To generate square wave using DAC. PROGRAM START MOV DPTR,#FFC8 MOV A,#00 MOVX @DPTR,A LCALL DELAY MOV A,#FF MOVX @DPTR,A LCALL DELAY LJMP START DELAY MOV R1, #05 LOOP MOV R2, #FF HERE DJNZ R2, HERE DJNZ R1, LOOP RET . 18 B) Generation of sawtooth wave Aim To create a sawtooth wave using DAC Program MOV DPTR, #FFC8 MOV A,#00 LOOP: MOVX @DPTR,A INC A SJMP LOOP
  • 4. 18 C) Generation of triangular wave AIM To generate triangular waveform using DAC. Program MOV DPTR, #FFC8 START MOV A, #00 LOOP1 MOV @DPTR,A INC A JNZ LOOP1 MOV A, #FF LOOP2 MOVX @DPTR,A DEC A JNZ LOOP2 LJMP START
  • 5. Exp No: 19 ) Stepper Motor Interfacing Aim To interface the stepper motor with 8051 and run it in clockwise and anticlockwise directions. Program Start: MOV DPTR,#4500 MOV R0,#04H JO : MOVX A,@DPTR PUSH DPH PUSH DPL MOV DPTR,#FFC0 MOV R2,#04 MOV R1,#0F DLY1: MOV R3,#0F DLY: DJNZ R3,DLY DJNZ R1,DLY1 DJNZ R2,DLY1 MOVX @DPTR,A POP DPL POP DPH INC DPTR DJNZ R0,JO SJMP START Address For Clockwise For Rotation Anticlockwise Rotation 4500 08 08 4501 01 02 4502 04 04 4503 02 01
  • 6. Clock wise Anticlock wise Step A1 A2 B1 B2 Step A1 A2 B1 B2 1 1 0 0 0 8 1 1 0 0 0 8 2 0 0 0 1 1 2 0 0 1 0 2 3 0 1 0 0 4 3 0 1 0 0 4 4 0 0 1 0 2 4 0 0 0 1 1