Skip to content

Document SAMD_AnalogCorrection library's 12 bit resolution requirement #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2021
Merged

Document SAMD_AnalogCorrection library's 12 bit resolution requirement #620

merged 1 commit into from
Oct 20, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Apr 5, 2021

The platform bundled SAMD_AnalogCorrection library is only compatible with 12 bit ADC resolution. This can be confusing to the user because:

  • The definition of ADC_RESOLUTION_BITS in the CorrectADCResponse sketch gives the impression this value can be modified by the user.
  • The default analogRead() resolution is 10 bits.

The first is resolved by the addition of a comment prohibiting changing the value of ADC_RESOLUTION_BITS.

The second is resolved by the addition of an analogReadResolution(12) call to the code generated by the CorrectADCResponse sketch.


Closes #608

CC: @hasenradball

The platform bundled SAMD_AnalogCorrection library is only compatible with 12 bit ADC resolution. This can be confusing to the user because:

- The definition of ADC_RESOLUTION_BITS in the CorrectADCResponse sketch gives the impression this value can be modified by the user.
- The default analogRead() resolution is 10 bits.

The first is resolved by the addition of a comment prohibiting changing the value of ADC_RESOLUTION_BITS.

The second is resolved by the addition of an `analogReadResolution(12)` call to the code generated by the CorrectADCResponse sketch.
@facchinm facchinm merged commit dda98e5 into arduino:master Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AnalogReadCorrection gives wrong results if ADC resolution is 10bit
2 participants