Hi, Jerson
Already had implemented Waiting loop while testing ... but conversion occurs while doing something else ... and has much enough time to be completed !
after that, multiplexing leds doesn't allow dead times ...
Alain
Hi, Jerson
Already had implemented Waiting loop while testing ... but conversion occurs while doing something else ... and has much enough time to be completed !
after that, multiplexing leds doesn't allow dead times ...
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 " !!!
*****************************************
Hi Alain
It is not about the conversion. Let me explain what I think could be the problem you see.
When you are in ModeI=1, you are putting out a bar graph + a dot position. That is what I understand.
What happens is when you are doing the bar graph, you are rapidly swiping the leds with the dot to enable your eyes to see a bar.
After that happens, you wish to have another dot that stays on to represent the current reading. This too happens immediately after the bar is displayed; but, it happens after you erase the bar with LATA=0. Now, only the dot persists till the next time you refresh the display for bar and dot. This time between 2 display refreshes is tied to the delay for ADC in Wait1(your code).
I choose to not wait for ADC, but process it when ready. Therefore the Wait10
Regards
Jerson,
I just commented the rolling average line
replaced it byCode:Ivalue = (Ivalue*9 + Nvalue )/10 ' Rolling average
... and it began to work fine @ first run !!!Code:Ivalue = Nvalue
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 20: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