Quote Originally Posted by HenrikOlsson View Post
Hi,
Not sure I understand exactly what you mean. A comparator will only tell you if its positive input is EITHER above or below its negative input. There is no way to tell if the two inputs are "equal". What you COULD possibly do is to use both comparators and create a window comparator which will tell you if the input is below, within or above the window/thresholds.

Or use the ADC...
/Henrik.
up to now i dont need to continue to work with the comparator module because it fail to do as i want
i want to use adc but have already read the adcin command but how to use adc to compare the two inputs in the pic i stop there,
can you give me any sample code on that issue?