R
Robert Monsen
- Jan 1, 1970
- 0
I am using a PIC12F675, which contains an onboard comparator. The comparator
has the option of using an onboard vref (which is just a voltage divider of
Vcc!) or an input pin. Also, it has the option of exporting the output of
the comparator to an output pin.
I spent several hours last night trying to figure out why the thing has not
been working properly for me (I'm using it as a trigger, and it would
sporadically fire without input,) and it turns out that when the output is
not configured to connect to a pin (e.g., its only readable by the CPU,) and
the only input is the V- input (the V+ input uses the Vref,) the thing is
oscillating! When I configure the output to come out to a pin, and bypass
the output to the V- input using a 0.1uF cap, it works quite well.
Anybody else having problems like this with the onboard comparator? Is it a
known POS? (Jim Thompson mentioned he was going to clean up some of the
analog work on the PIC line. Perhaps this is one of those things?)
FYI, I'm feeding the V- input with a GP2D12 IR proximity detector, and
running the chip at Vcc=5V. I turned off the pull-ups for the V- input.
Regards,
Bob Monsen
has the option of using an onboard vref (which is just a voltage divider of
Vcc!) or an input pin. Also, it has the option of exporting the output of
the comparator to an output pin.
I spent several hours last night trying to figure out why the thing has not
been working properly for me (I'm using it as a trigger, and it would
sporadically fire without input,) and it turns out that when the output is
not configured to connect to a pin (e.g., its only readable by the CPU,) and
the only input is the V- input (the V+ input uses the Vref,) the thing is
oscillating! When I configure the output to come out to a pin, and bypass
the output to the V- input using a 0.1uF cap, it works quite well.
Anybody else having problems like this with the onboard comparator? Is it a
known POS? (Jim Thompson mentioned he was going to clean up some of the
analog work on the PIC line. Perhaps this is one of those things?)
FYI, I'm feeding the V- input with a GP2D12 IR proximity detector, and
running the chip at Vcc=5V. I turned off the pull-ups for the V- input.
Regards,
Bob Monsen