SpenceKonde/DxCore

Comparator Reference Voltages Incorrect?

simjman opened this issue · 3 comments

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

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.

Fixed now

That's great, glad we caught it!