Comparator Library Questions #472
Replies: 4 comments 4 replies
-
Possible suggestion: check the STATE bit of the AC STATUS register (AC0.STATUS, I think) |
Beta Was this translation helpful? Give feedback.
-
Sorry for late response - use the .read() method of the Comparator objects; should return true or false. Didn't you read the documentation for the library it's right.... uhh, errrr... wrf. Missing from the README.md for the library, that's an easy fix will be in 2.4.0 later today. If that doesn't work that is a bug, open an issue. |
Beta Was this translation helpful? Give feedback.
-
Sorry, off topic rant. Had spent ages trying to get serial programming
working, so went to curiosity, and now that's stopped working on serial!!
Just an observation on serial programming. Will let you know how it goes
with the library.
Thanks
Steve
…On Mon, 28 Jun 2021, 9:54 pm Spence Konde (aka Dr. Azzy), < ***@***.***> wrote:
Not sure what you're talking about, maybe start a new topic or issue (if
it's a defect in core or documentation that needs to be fixed).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#472 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5FYLQDW3KRPZZPSWTARC3TVDORDANCNFSM47KMBWFA>
.
|
Beta Was this translation helpful? Give feedback.
-
I would be truly in awe if it didn't (it's 1 line - and a very short line too, something like return !!(AC.STATUS&AC_STATE_bm), AC being the member variable that's a reference AC0 (or AC1/AC2 on parts that have them). :-P Glad it's sorted. |
Beta Was this translation helpful? Give feedback.
-
Hello,
The answer may be blindingly obvious (when you know!!), but how do you read the output pin in the Comparator library? I am using a 1614 part and using 2 comparators basically as level shifters.
The internal reference example works fine, and I can see the outputs toggling happily on my scope, the interrupt example also works fine, and I can see interrupts happening with the output disabled.
What I cant figure out is how to read the data on a none interrupt line. Ideally I would like to disable the output on this channel as well, and read the comparator status bit (bit4) instead , or any other method( pins are scarce on 1614!!!).
I feel this is really something that should be in the library,, but Ive no idea how to do it. If I HAVE to use pin how do I read it? DigitalRead(ACOut) doesn't seem to work. Any help please
Thanks
Steve
Beta Was this translation helpful? Give feedback.
All reactions