How do I interface a PIR motion sensor to a PIC18F4550 Microcontroller?

Discussion in 'The Projects Forum' started by Svenmonk, Aug 1, 2010.

  1. Svenmonk

    Thread Starter New Member

    Aug 1, 2010
    1
    0
    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!
     
  2. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    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.
     
Loading...