Pages: 1 [2]   Go Down
Author Topic: Bugs in analogRead-Command found  (Read 2541 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Edison Member
*
Karma: 44
Posts: 1482
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very interesting. Thanks for the infos!
Logged

Dallas, TX
Offline Offline
Sr. Member
****
Karma: 10
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: 1 [2]   Go Up
Jump to: