SlideShare una empresa de Scribd logo
1 de 6
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (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
 

Destacado

Destacado (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
 

Similar a 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
 

Similar a 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
 

Más de 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
 

Último

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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)
 

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