Yes Paul, I read Melanie's tutorial. At my level of comprehension, it is more like an example using a Comparator module in a 16F628.
Yes Darrel, I read the MICROCHIP's Comparator Tips & Tricks document.
The problem is, I don't clearly understand all the different pin/port/register names described in the datasheet. If some of them are obvious to me (VRef, A, D, etc..), others are not (CINV, VIN, CIN, etc..).
Sorry if this sounds stupid and looked easy as a conventional ampli-op before I started, but all the µC-specific terminology messes my mind up.
Just an example; when I read the 12F765's datasheet Comparator Operating Modes, I get lost at the very first figure....
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1703&stc=1&d=118095092 1">
Here, I assume I have to set ports GPIO.0 & GPIO.1 to Analog (ANSEL register); is this right? But what is with the Output? Is it going to turn to an "1" when CIN+ > CIN-? How will I use it?
And now, is it just the same as before but when the condition is CIN+ > CIN-, does COUT (bit) go to a "1"?
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1704&stc=1&d=118095155 5">
What are CINV, VIN, CIN and what are they doing exactly?
It's confusing me.
Bookmarks