I don't know what your project is about, but if "15 min" is not a absolute, and you want to waste a little time on the chip....
there are approx 900 seconds in 15 minutes.
Using a long int of 32768 you can break a second down into 1/36 of a second.
Since the chances are, your main program will be screaming fast, you only need to call a "Sub routine" wherever you want, and think is appropriate.
Its simple, no big thinking of Code, no interupts...
double counter
counter=900
Main:
......
.....
ADC in...
LCD out...
Rest of program....
......
Goto "Pause and light"
goto Main
Pause and Light:
pause 30 (Pause 1000 is 1 second, and 30 is adjustable to your liking)
Counter=counter-1;
If counter==0 then
Check continuity.
flash bulb.
counter=900
endif
goto main.
end
This is a Psuedo code.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks