Skip to content
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

Offsetcals adc1 fix #22

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

brendanmatkin
Copy link

My attempt to fix #18. Follows datasheet section 9.4.9.8 Calibration Command Procedure.

NOTE: I didn't fix every cal procedure. This also depends on some changes from PR #21.

  • fix calibrateSysOffsetADC1(shorted1,shorted2,waitTime=0). (set continuous mode, then start shorted conversion BEFORE calibrating)
  • fix calibrateSelfOffsetADC1(waitTime=0). (set continuous mode, then start floating conversion BEFORE calibrating)
  • waits for DRDY pin to be low OR for a specified wait time (table 9-28 in section 9.4.9.8, pg79). Max possible time is 9201 ms (2.5SPS + Sinc4)
    • user must determine their own wait time if not using DRDY. Just use DRDY if you can!
  • update README

Only tested with ADS1262. Seems to work well! Strangely, selfOffset gives me results that are further away from zero once the inputs are shorted but really stable - I suppose the extra resistance of my breakout? I'm using the mikroe click adc13. Maybe someone else can test and let me know if this is good?

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.

Calibration functions wrong?
1 participant