All I need is the code for the interfacing as I have done the connections already. it's really been bugging me and any help given is greatly aprreciated. Thanks guys!
Well, you have two choices on this matter:
- Run in a infinite loop waiting for the PIR sensor to send a signal
- Use the Interrupt-on-Change feature available on some PICs to trigger an interrupt.