revelator
- 10th March 2010, 19:44
I've been trying t read a Seametrics SEB 3/4" flow meter which produces 330 pulses per gallon with a 16F876. This flow meter is a hall effect with three wires : Red 5-32 VDC, Wht (signal), and Blk Negative. I'm trying to use TIMER0 (pin 6 on the 16F876 RA4/TOCK1) to count to say 40 pulses then start a process.
I see that I can set pullup on the OPTION_REG but tried that with no reads. The other option is to hard wire a resistor (1-10k) to vdd and not use the pullup option. Is that typicaly what's used for a hall effect sensors?
Another question of confusion: Suppose I have a high flow rate of say 10 gals/minute on this flow meter, ~55 pulses/sec. Does Timer0 keeps tack of incoming pulses while the processor is running about with other tasks in the program, say reading a digital temp sensor in the main program loop.
Does it make a difference in the above if I'm using Timer0 interrupts or not. Would I miss pulses if I'm not using interupts?
First time using timers.....
thanks
I see that I can set pullup on the OPTION_REG but tried that with no reads. The other option is to hard wire a resistor (1-10k) to vdd and not use the pullup option. Is that typicaly what's used for a hall effect sensors?
Another question of confusion: Suppose I have a high flow rate of say 10 gals/minute on this flow meter, ~55 pulses/sec. Does Timer0 keeps tack of incoming pulses while the processor is running about with other tasks in the program, say reading a digital temp sensor in the main program loop.
Does it make a difference in the above if I'm using Timer0 interrupts or not. Would I miss pulses if I'm not using interupts?
First time using timers.....
thanks