Write down the difference between hardware and software interrupt.


The hardware interrupts could be internal (like timers) or external (like in change or communication receive) which are generated by specific hardware (the timer is also a internal hardware peripheral, 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 in others micros. 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,

-      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. 

No comments

Dear Members, Thanks for Your Comments. We must be reply your comment answer as soon as possible. Please Stay with us.....

Theme images by ideabug. Powered by Blogger.