Hi,
Not sure what your trying to do but it looks like perhaps your NEXT W should be moved to between the LCDOUT and the ENDIF statements. Then, if you want to see it count on the display you'll probably need a short Pause in there a well.
/Henrik.
Hi,
Not sure what your trying to do but it looks like perhaps your NEXT W should be moved to between the LCDOUT and the ENDIF statements. Then, if you want to see it count on the display you'll probably need a short Pause in there a well.
/Henrik.
Hi, Clinton
@ first your counting method is wrong ... you should count transitions ( L> H i.e.) of your output sensor.
@ second ... what's the reason of the " For w = 0 to 65 ..." loop ???
@ third ... ----------------d°----- " W1 = W1 + W/65 " ???
once that tied ... display should slow down a bit ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
ok..
1- the loop, For W = 0 To 65, I meant to count pulses for 1 litre(65 pulses=1litre)
so the value I would be storing in W1 will be(0+1), followed by (1+1), then (2+1) and so on.. every 65 pulses.
The objective is to count litres and display the value on LCD.I realised that count by litres is not good since, e.g. 1 cup of water is not a litre,so I would miss that count.
That is why I wanted to count at a better resolution of 1 pulse(=0.0154litres).
I hope you understand my objective better now...
Thanks for the input, it is appreciated.
Looking forward to more help
Bookmarks