
Originally Posted by
Jerson
I don't think you can check comparator levels; that would involve reading analog levels(ADC). What you can do is set the comparator threshold. Then the comparator tells you 'Above' or "Below" threshold by its output. This is what you use to trigger the comparator interrupt.
[/code]
But the comparator is only analogue on the
input side (where I will preset the comparator threshold to be my circuit's ZC point ....about 1/2 VCC) ...it's output is digital & can therefore be read (I think), this from the associated PIC's datasheet (16f1828)...
18.2.2 COMPARATOR OUTPUT SELECTION
The output of the comparator can be monitored by reading either the CxOUT bit of the CMxCON0 register or the MCxOUT bit of the CMOUT register.
Bookmarks