O'Reilly logo

PIC in Practice, 2nd Edition by David W Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14

Interrupts

New instructions used in this chapter:

• RETFIE

We all know what interrupts are and we don't like being interrupted. We are busy doing something and the phone rings or someone arrives at the door.

If we are expecting someone, we could look out of the window every now and again to see if they had arrived or we could carry on with what we are doing until the doorbell rings. These are two ways of receiving an interrupt. The first when we keep checking in software terms is called polling, the second when the bell rings is equivalent to the hardware interrupt.

We have looked at polling when we used the keypad to see if any keys had been pressed. We will now look at the interrupt generated by the hardware.

Before moving onto an example ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required