Hello Jumper
I have two Jumpers that i read at power up to choose four possible timings
16 seconds, 18, 19 and 20 seconds
I want use on the PIC 12F509 the internal 4Mhz oscilator
Best Regards
Pedro
Hello Jumper
I have two Jumpers that i read at power up to choose four possible timings
16 seconds, 18, 19 and 20 seconds
I want use on the PIC 12F509 the internal 4Mhz oscilator
Best Regards
Pedro
I might be slow.. but I still dont understand fully.
You have 2 jumpers you can read at startup to set the time window.. so you get 4 different times (16,18,19,29 sec).. I am with you this far.
Then you say you look for something to happen during this time window... if it happens.. then you start a new time window to look again... if it doesnt you stop the program.
so...
power up
check input pins
load a word variable with the correct time (1600 for 16 s and 2000 for 20 sec)
start_again:
n=0
for n =0 to word variable
check for your signal
if you find your signal goto start_again
Delay_ms(9)
Delay_us(1000) ' here you can adjust the loop time
next n
STOP
This could work unless you are looking for 16.000000000000000 seconds or similar. By adjusting the delay_us() time you can calibrate the loop time.
Since you doesnt seem to have anything else to do during this time why do you want to use the timer?
/me
Hi Jumper
You are right, i don't need to use the Timer
Thanks
Regards
Pedro
Bookmarks