This is what I want:
initializate interrupt for RB0/INT
so it will be always runing, when and event is occurred a counterA will be incremented
intializate ADC, I can start/stop the ADC when I want
Initializate timer0
it will run forever, and generates an interrupt every 20ms
if by the ADC I detect 1.25V = (ADRESH=0, ADRESL=256)
and if this event occurs for an equal interval of 300ms then I should turn on a led and increment counterB. then after 1 minute I should turn off the led
if againf by the ADC I detect 1.25V, and it persists for 300mS I should turn on a led, after one minute I should stop the led and increment counterB.
but, if before the second event there haven't been any other event for about 30 minutes then I should clear counterB
how i can gent the 30 minutes, without taking processing time as delays do
with timer1, this is a 16 bit register.
also I want to know if ADC can run without taking processing as delays
initializate interrupt for RB0/INT
so it will be always runing, when and event is occurred a counterA will be incremented
intializate ADC, I can start/stop the ADC when I want
Initializate timer0
it will run forever, and generates an interrupt every 20ms
if by the ADC I detect 1.25V = (ADRESH=0, ADRESL=256)
and if this event occurs for an equal interval of 300ms then I should turn on a led and increment counterB. then after 1 minute I should turn off the led
if againf by the ADC I detect 1.25V, and it persists for 300mS I should turn on a led, after one minute I should stop the led and increment counterB.
but, if before the second event there haven't been any other event for about 30 minutes then I should clear counterB
how i can gent the 30 minutes, without taking processing time as delays do
with timer1, this is a 16 bit register.
also I want to know if ADC can run without taking processing as delays