Page 1 of 1
Advice on ADC Resolution settings
Posted: Mon Jun 12, 2017 10:07 pm
by Steve001
Evening All
Just playing about with a ECIO40P and two LM35 temperature sensors these are connected to port E
I am wanting better resolution i know about vref voltage and V ref options
can someone explain these settings as i have not played around with these settings before. What effect will it have to the other analogue inputs ?
Steve
Re: Advice on ADC Resolution settings
Posted: Tue Jun 13, 2017 11:17 am
by Benj
Hi Steve,
The VREF voltage is simply used as a multiplier by the ReadAsVoltage and ReadAsString macros to provide a floating point voltage value, it makes no difference to the binary ADC reading resolution.
The VREF options allow you to switch between VCC, VREF+ and on some devices a fixed internal reference.
If you use the VREF+ mode and provide a fixed voltage to the VREF+ pin lower than VCC then it will allow a finer resolution to the ADC channel but the max voltage will be lower.
Any changes you make to a single ADC channel should not effect other ADC channels.
The conversion speed and pre-charge time are also key elements to play around with to get the best possible results.
Re: Advice on ADC Resolution settings
Posted: Tue Jun 13, 2017 12:43 pm
by Steve001
Hi Ben
Thank you for that will have a go. Found that you can read the ADC with 10 or 12 bit last night what difference would going down this route make ?
http://www.flowcode.co.uk/wikiv7/index.p ... bit_sample
Steve
Re: Advice on ADC Resolution settings
Posted: Tue Jun 13, 2017 12:59 pm
by Benj
Hi Steve,
The ADC bit depth is based on the device.
Reading as a byte and the returned value will always be in the range 0-255.
Reading as an int and the returned value should automatically default to the max available bit depth of the ADC on the device your using.
The device datasheet will tell you how many bits the ADC is capable of but you can also use the Device Helper component from the Tools Component Menu which lists amongst other things the current target's ADC max bits.
10-bit = 0-1023
12-bit = 0-4095