Go Down

Topic: Bugs in analogRead-Command found (Read 8755 times) previous topic - next topic


Mega has six bits, MUX5:0.  These control pin/pins and single end vs differential input.  See the ATmega640/1280/1281/2560/2561 datasheet.

The S/H problem is just one of many problems with analog input.

People have stumbled on the S/H problem for years and the Arduino Company hasn't provided a simple solution.

I didn't suggest modifying analogRead() since a whole redesign of the API is needed.

The dummy read trick appears in many forum posts but is not a clean solution.

I did a huge study of AVR ADC performance so I developed my own library but there is little to no chance of the Arduino Company adopting it.


Very interesting. Thanks for the infos!

Papa G

Quote from: fat16lib
All SAR ADCs have a sample and hold capacitor which must be charged by input to the ADC.  High impedance inputs can't quickly charge the sample and hold.

I couldn't help but notice this generalization. An SAR ADC does not have to have a track and hold amplifier in order to be an SAR ADC. Early chip ADC's had separate SHA's and in fact such IC's are still in use and production. I'm not trying to start an argument, just pointing out a fact that has maybe fallen through the crack due to the rapid rise of technology.

Go Up