Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIR as a Switch with timer

Status
Not open for further replies.

peterjohn0000

Newbie level 6
Joined
Aug 29, 2012
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
Can somebody help me!
I want to use PIR as a substitute for light switch!

All I want to do is interface the PIR with a timer! When the sensor detect a person the it will send a signal to timer that will make the ligh on! The reason i want a timer is the light will no immediately turn off when the sensor goes low! Please no program is required!

Thanks in advance!
 

initialize two interrupt routine 1, External interrupt 2, Timer interrupt
PIR connect to an interrupt Pin
Device connect to GPIO pin
clear timer register ,stop timer ,deactivate the device

wait for interrupt while(1);

1, when External interrupt occur activate light , clear timer register ,start timer finally exit from External interrupt routine.
2, when timer interrupt occur deactivate the device , stop timer finally exit from timer interrupt routine.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top