Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Software interrupts

Status
Not open for further replies.

pakhi

New Member
Hello,

Can anyone tell me,what software interrupts are.... in microcontroller At89C51 or any 8051 controller & how to use them in any application ???

Thanx,
pakhi
 
Hi,

An interrupt is a pulse or level that is delivered to the microcontroller when a peripheral device needs servicing. The servicing is done by the software and can be as simple as receiving a character from the keyboard.

An interrupt servicing routine is a subroutine that is executed every time the microcontroller receives an interrupt from a peripheral device.

Lets assume that you wanted to read the input from the keyboard. You can poll the keyboard in a software loop until you receive an input. However, this process prevents your software from performing other tasks.

Or you can design in interrupt servicing routine that is executed only when the interrupt occurs. The interrupt is hardware driven so you don't have to worry about it when writing software. Your interrupt servicing routine will fetch the character entered and process it. When there is no interrupt your software performs it's other tasks.

Your software does not call the interrupt servicing routine. The call is taken care of by the microcontroller. Therefore, the interrupt servicing routine can be executed at any time. When the execution is complete, the control is transfered back to your program.

John
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top