Hi everyone,
I have this project for school involving a 12F675..as you know this is a small 8 pin PIC. Well the project involves a SWITCH a DC MOTOR and a PHOTODIODE.....so this is the layout for the project.....when a human presses the switch for 2 sec the program starts running..if the photodiode detects light it will send back that analog signal and in return spin the motor for 10 sec and then stop...same as to detecting night/dark again sending the signal to the (M) to spin for 10 sec.
So friends this is my question....i will try and explain......how do i get the photodiode to stop "constently" sucking power (1mA) from the 9v battery when not in use. I ask this because the battery is gonna be plugged in for say a couple of days even weeks. Ok program stops..pic goes into "hibernation mode" which that takes care of the pic sucking power now how do i take care of that photodiode??
I was advised to add a program line that basically tells the pic to look at the photodiode at certain times of day this is simple 7am-8am when the sun rises and lets say 730pm-8pm.
Is this correct???