EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / ASM software interrupt

ASM software interrupt

|

Microcontroller › 8051 › ASM software interrupt

  • This topic has 1 reply, 2 voices, and was last updated 14 years, 3 months ago by Amit Joshi.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 7, 2011 at 7:46 am #650
    Ryan
    Participant

    First of all I want to say hello to all the member here =)

    I am trying to learn more ASM on my own cause I can’t get any good help from professors in my school.

    I have one problem I need to use interrupt in my newest program but I don’t know how to use it cause no-one show us how does interrupt looks like in source code… We have been only learning theory…

    Pls tell me how xactly we use interrrupts

    February 9, 2011 at 1:13 pm #5481
    Amit Joshi
    Participant

     interrupts are used when we need to perform a special task during regular task. the full attention of controller is removed from regular task to an important task until this important task is performed.

     

    for example a controller is busy in blinking led on a port0. at Pin 1.0 a buzzer is connected. and a switch is connected to int0 pin. ur task is to on the buzzer when u want. if u use polling u have to monitor P3.2 continuously during led blinking process and this will consume ur 24 clock cycle in each poll. this is not efficient programming .  if u use interrupt concept there is no need to monitor the pin P3.2.

    example code-

                ORG 0000H

                LJMP MAIN;

     

                ORG 0003H               // int0 isr address   

                SETB P1.0;                 // buzzer on when interrupt occur

                RETI;                          // return interrupt 

     

                  ORG 0030H

    MAIN:  SETB TCON.0;        // int0 an edge trigger interrupt

                 MOV IE,#81H;        // enable harwre interrupt int0

    HERE:   CPL P0;                   // led bilinking

                 ACALL delay;

                 SJMP HERE;

     

    Delay:                                 // generate a delay subroutine 

     

    END

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Actin group needed for effective PCB software tutorials May 24, 2025
  • going out on a limb and praying the schematic is correct May 24, 2025
  • Easy PC Demo version Schem and Layout program questions May 24, 2025
  • Back to the old BASIC days May 24, 2025
  • Fluke 123 scopemeter not reading ANY voltage, please help May 24, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise