13.07.2013 Views

Interrupts

Interrupts

Interrupts

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

An Example:<br />

• So, let’s work through an example:<br />

1/4/2010<br />

– Assume we have a switch attached to PD0 that will<br />

cause a high-to-low transition<br />

– We want the signal to interrupt the processor and<br />

execute our ISR<br />

• So, we must write a initialization routine that will<br />

allow this interrupt to occur<br />

Exercise: What must the first two instructions be for our program?<br />

22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!