Thank you very much for your response, you have accurately described my problem. I will try your suggestions.
I do have a further question though: How come using the same 1.5V battery, with the pico software behaves consistently without any noise issues? What I want to do is almost identical to the Pico software, except I want to do it realtime without having to export the spreadsheet to process the data.
This is the code in a timer routine (taken from sample code provided):
- Code: Select all
' Trigger enabled,
' Auto trigger after 1000 ms
' Rising trigger on channel 1 at threshold 512 (512=1.25V)
' No delay
ok = adc11_set_trigger(True, True, 1000, 1, False, 512, 0)
' 10 samples in 20 ms
' channels 1 and 2
channels(0) = 1
channels(1) = 2
us = adc11_set_interval(20000, 10, channels(0), 1) 'Set time period of readings
value = adc11_get_value(1) 'Get ADC count
'volts = value * 2500# / 1023 'Convert ADC count to mV
'ADCV2 and V3
volts = value * 2.5 / 4095
List1.AddItem Str(volts) & " V" 'Print voltage to listbox1
lblVoltage.Caption = "Voltage: " & volts & " V"
It starts with a value like 2V sometimes when it should be 0, and then seems to respond to my applying the battery voltage, but it is inconsistent.
Please examine my code and see if there's any way I can improve it.