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

Comparator Reference Voltages Incorrect? #488

Closed
simjman opened this issue Oct 7, 2023 · 3 comments
Closed

Comparator Reference Voltages Incorrect? #488

simjman opened this issue Oct 7, 2023 · 3 comments
Labels
Bug Behavior of core does not match API or reasonable expectations

Comments

@simjman
Copy link

simjman commented Oct 7, 2023

I was playing with the comparator reference voltages and couldn't work out why an interrupt wouldn't fire when using vref_2v500, but would when using vref_4v096.

I believe the issue lies here:

vref_2v500 = 0x02, // 2.5V

and here:

vref_4v096 = 0x03, // 4.096V

This is from the DA/DB datasheet for reference:

image

@simjman simjman changed the title Comparator Comparator Reference Voltages Incorrect? Oct 7, 2023
@SpenceKonde
Copy link
Owner

Yup. I hadn't realized that they changed the order on the Dx/Ex series, I thought it was the same as tiny2 (mTC also gets the identical library).

I belive it was like that since at least 1.3.0, maybe longer, Well over a year. You're the first to notice.

@SpenceKonde
Copy link
Owner

Fixed now

@SpenceKonde SpenceKonde added the Bug Behavior of core does not match API or reasonable expectations label Oct 7, 2023
@SpenceKonde SpenceKonde added this to the 1.5.x - 1.5.0 bugfixes milestone Oct 7, 2023
@simjman
Copy link
Author

simjman commented Oct 10, 2023

That's great, glad we caught it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Behavior of core does not match API or reasonable expectations
Projects
None yet
Development

No branches or pull requests

2 participants