Thanks for the help. I understand how your code works, but I still can't get the comparator to work as far as I can tell. All I'm trying to do now is use 2 pots as the analog inputs Vin+ and Vin- and use COUT to turn an led on and off. Is there a drive problem with the comparator? Do I have to use the internal output as a signal to drive a separate pin HIGH or LOW?




Bookmarks