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

DAC Analog Reference #26

Open
CSC-Olivier opened this issue Jan 18, 2019 · 1 comment
Open

DAC Analog Reference #26

CSC-Olivier opened this issue Jan 18, 2019 · 1 comment

Comments

@CSC-Olivier
Copy link

It seems that the DAC always use the 3.3V reference even if analogReference is used to define a different reference.
I see that line 272 of wiring_analog.c is:

DAC->CTRLB.reg = DAC_CTRLB_REFSEL_AVCC | // Using the 3.3V reference

Is there an easy way to change this so that one can use the 1.0V reference or the 1.65V reference for the DAC?

@CSC-Olivier
Copy link
Author

OK, if I change line 272 of wiring_analog.c to:
DAC->CTRLB.reg = DAC_CTRLB_REFSEL_INT1V | // Using the 1V reference
Then it uses the 1V reference. Not sure how to make the DAC automatically use the reference defined by analogReference though. Maybe by using DAC_CTRLB_REFSEL(value) ?

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

1 participant