i use two sensors, the pic16F877A get the signal from 1st sensor the timer ON,
when the signal get from 2nd sensor timer OFF, then calculate the between time on & off.
hi,
suppose your pic is running with a 4 mhz crystal and your timer1 prescalar is 1,then your timer will increment in each 1us(micro sec). By this way you can calculate the time delay