`It seems to me that the 10-bit ADC range can be extended (without`

increasing the resolution, which remains 10 bits) by manipulating Aref,

the analog reference voltage on 8535 processor pin 29. Ultimately

limited by noise, the low end of the BX-24's analog input range can be

extended another six, or even eight, bits pretty easily.

Aref is normally tied to Vcc so, typically, Aref = 5.0V and the ADC

range is the 10 bits of values below 5.0V with a unit resolution of

5.0/1024 ~= 4.88mV. By lifting pin 29, Aref can be supplied by another

source. If that source provides voltages lower than Vcc, the effective

ADC range is the 10 bits of values below that voltage. For example, if

Aref = 2.5V, the unit resolution is 2.5/1024 (one bit below ~4.88mV)

~=2.44mV. If Aref = 1.25V, the unit resolution is ~1.22mV, etc.

BasicX provides a mechanism to generate these reference voltages under

program control, functions DACPin() and PutDAC(). The functions produce

an 8-bit PWM burst on an output pin that will, properly treated, yield

an analog voltage in the range 0 to 5.0*255/256V, or one-bit less than

5.0V. It is, then, possible to generate 5.0*128/256 = 2.5V, 5.0*64/256

= 1.25V, and so forth, down to 5.0*1/256 ~.5mV. If Aref = 5.0*1/256,

the theoretical unit resolution of the ADC will be 5.0*1/256/1024 ~=

19uV. That is an eight bit extension of the ADC's low-end range. A

six-bit extension - yielding a convenient 16-bit value - will have a

unit resolution of about 76uV. Such sensitivity will very likely be

problematic due to noise, but slow signals might well be sampled

successfully at 16 or 18 bits using this method.

An iterative procedure could shift the reference voltage down until the

ADC MSB is set - or six loops, whichever occurs first - providing 10

bits of accuracy over a 16-bit range below 5.0 volts. Tom

increasing the resolution, which remains 10 bits) by manipulating Aref,

the analog reference voltage on 8535 processor pin 29. Ultimately

limited by noise, the low end of the BX-24's analog input range can be

extended another six, or even eight, bits pretty easily.

Aref is normally tied to Vcc so, typically, Aref = 5.0V and the ADC

range is the 10 bits of values below 5.0V with a unit resolution of

5.0/1024 ~= 4.88mV. By lifting pin 29, Aref can be supplied by another

source. If that source provides voltages lower than Vcc, the effective

ADC range is the 10 bits of values below that voltage. For example, if

Aref = 2.5V, the unit resolution is 2.5/1024 (one bit below ~4.88mV)

~=2.44mV. If Aref = 1.25V, the unit resolution is ~1.22mV, etc.

BasicX provides a mechanism to generate these reference voltages under

program control, functions DACPin() and PutDAC(). The functions produce

an 8-bit PWM burst on an output pin that will, properly treated, yield

an analog voltage in the range 0 to 5.0*255/256V, or one-bit less than

5.0V. It is, then, possible to generate 5.0*128/256 = 2.5V, 5.0*64/256

= 1.25V, and so forth, down to 5.0*1/256 ~.5mV. If Aref = 5.0*1/256,

the theoretical unit resolution of the ADC will be 5.0*1/256/1024 ~=

19uV. That is an eight bit extension of the ADC's low-end range. A

six-bit extension - yielding a convenient 16-bit value - will have a

unit resolution of about 76uV. Such sensitivity will very likely be

problematic due to noise, but slow signals might well be sampled

successfully at 16 or 18 bits using this method.

An iterative procedure could shift the reference voltage down until the

ADC MSB is set - or six loops, whichever occurs first - providing 10

bits of accuracy over a 16-bit range below 5.0 volts. Tom