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

Differential Mode does not work #3

Open
userx14 opened this issue Oct 27, 2019 · 1 comment
Open

Differential Mode does not work #3

userx14 opened this issue Oct 27, 2019 · 1 comment

Comments

@userx14
Copy link

userx14 commented Oct 27, 2019

I have tried to use the differential mode, but when using the library from an external file the variable ScanMode does lose it's value.
Therefore ADS1256_SetMode(1) has no effect.

By moving the variable into the class I was able to fix the problem.

I will add a pull request, the issue is present in the python2 aswell as the python3 version.

@jesgome
Copy link

jesgome commented Apr 23, 2022

I looked into this too. I shared a pull request update to ADS1256.py that seems to work and would appreciate your feedback! I made a SetMode class and set it at 0 for single input by default in ADS_init class.

Calling SetMode and setting it to anything other than 0 activates differential mode.

For what its worth, I found out that it's not necessary to do it anyway since the technical documents for ADS1256 from Texas Instruments claim that ADS1256 is always operating in differential mode and that comparing to AGND is the same as comparing to another pin. You can find the difference between (AIN_0-AGND)-(AIN_1-AGND) after getting pin values and come to the same answer.

But its nice to have it all happen automatically now!

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

No branches or pull requests

2 participants