+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Newbie level 5
    Points: 470, Level: 4

    Join Date
    Sep 2011
    Location
    Tunisia
    Posts
    8
    Helped
    0 / 0
    Points
    470
    Level
    4

    Difference between software interrupt & hardware interrupt?

    Hello,

    Does anyone can help me know the difference between the software interrupt and hardware interrupt?


    thank's
    The problem of information overload, therefore, may not be the quantity of it but our inability to know what to do with it. »
    Danniel Tammet

    •   Alt18th April 2012, 10:22

      advertising

        
       

  2. #2
    Full Member level 5
    Points: 2,176, Level: 10
    cubanflyer's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    255
    Helped
    75 / 75
    Points
    2,176
    Level
    10

    Re: Difference between software interrupt & hardware interrupt?

    A software interupt is drive by a predifined period of time usual a counter, that overflows or reaches zero, that triggers the interrupt routine, where as a hardware interrupt is from an external force for example a switch. HTH
    There are 10 kinds of people in the world.
    Those who understand binary and those who don't.


    1 members found this post helpful.

    •   Alt18th April 2012, 23:12

      advertising

        
       

  3. #3
    Advanced Member level 2
    Points: 5,582, Level: 17
    Kurenai_ryu's Avatar
    Join Date
    Jun 2006
    Location
    Bolivia
    Posts
    571
    Helped
    127 / 127
    Points
    5,582
    Level
    17

    Re: Difference between software interrupt & hardware interrupt?

    Quote Originally Posted by cubanflyer View Post
    A software interupt is drive by a predifined period of time usual a counter, that overflows or reaches zero, that triggers the interrupt routine, where as a hardware interrupt is from an external force for example a switch. HTH
    as far as i konw those are still hardware interrupts....

    the hardware interrupts could be internal (like timers) or external (like io change or communication receive) which are generated by specific hardware (the timer is also a internal harware periferal, separated from the internal CPU).

    some microprocessors (and thus some microcontrollers) have an specific instruction for a "software interrupt" which 'generates' or 'emulates' the behavior from a hardware interrupt, but it's 'called' from the user program (via the software interrupt instruction (like an ASM nemonic of SWI in a 6800, or a software reset in others micros (which some people consider a interrupt per-se))

    a software interrupt call is different from any normal call by:

    -it calls to a specific interrupt vector like a hardware interrupt.
    -if the micro is capable, it will also save the working area (like accumulators and some registers) like a hardware interrupt
    -you end the interrupt routine like any interrupt (via a interrupt-return in contrast with a normal return)
    -if the micro is capable of some configuration or it has only one interrupt vector, you can 'call' a hardware interrupt from the main code.

    so, a software interrupt emulates most features from a hardware interrupt, even you can use some hardware interrupt routines via a software interrupt. but not many microcontrollers have an actual real software interrupt instruction.
    ----------------
    K~ Ryu
    ~"Sorry my bad english, my native language is C "



+ Post New Thread
Please login