Re: how to get an analog potentiometer to settle down?
KeithV, You could always low pass filter the A/D reading if you are not requiring the responce speed. If you require the speed then just read the A/D faster. Something like this:
FILTG CON 32 'FILTER CONSTANT (255 = NO FILTER, 1 = MAXIMUM FILTER)
VOUT VAR WORD 'FILTER HISTORY
LOWPASS: '------------------- LOW PASS FILTER --------------------------
VOUT = VOUT - (VOUT */ FILTG) + A_D_READING
FILTERED_VOLTAGE = VOUT */ FILTG 'FINAL FILTERED OUTPUT COMPUTED
RETURN
I use something similar to it all the time....
Dave Purola,
N8NTA
EN82fn
Bookmarks