Re: Missing something ... But What ????
Jerson,
I just commented the rolling average line
Code:
Ivalue = (Ivalue*9 + Nvalue )/10 ' Rolling average
replaced it by
... and it began to work fine @ first run !!!
that is somewhat incredible ... 
6 month ago, I wrote a similar program displaying on a couple of 7 segments : everything was fine.
but I didn't use any average ...
I do not understand that because the value was initialized with the average calculated just before entering the display loop ...
Further tests look to show Nvalue = 0 @ first loop ( why ??? we are looping until a conversion result being available ... and it's ages the Pic ADC is stabilised ! ) : value is close to 9/10 Actual value, and then ... minimum value is generally under the minimum, and then not shown !
that's how it should work ... but not why !
I'll try to make further tests ...
Alain
Last edited by Acetronics2; - 5th November 2012 at 19:48.
************************************************** ***********************
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 " !!!
*****************************************
Bookmarks