This was a great idea! But it would require the same resistors as a external divider from my accurate (+/- 1%) power source... It would however make the trigger-point software-selectable by giving PIC control over VREF. I still have a problem clamping input to Vdd when FET is off. KreAture ----- Original Message ----- From: "Nigel Orr" To: Sent: Friday, June 20, 2003 10:17 AM Subject: Re: [PIC]: Detecting a 100mV crossing with a PIC16F62x? > pic microcontroller discussion list <> wrote on Thursday, June 19, 2003 > 3:25 PM: > > > I thought of using the comparators and internal VREF but as I > > understand, the lowest VREF I can get it is 1/24 *Vdd. (except for > > 0/24 wich is pointless here.) This would be about 0.208Volts +/- 1% > > in my supply-regulator and +/- 10mV max input offset voltage. > > (Parameter D300) My error would be less than +/- 6% so it would be > > more than OK. Problem is VREF would be too high. > > Vref is available as an output (set VRCON,VROE and reference appears on > RA2), divide it down as required externally with a potential divider, and > connect it back into the other comparator. There is obviously a risk of > resistor drift at extremes of temperature etc, but would it be good enough > for your application? > > Nigel > -- > Nigel Orr, Design Engineer nigel@axoninstruments.co.uk > Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT > Tel:+44 1467 622332 Fax:+44 1467 625235 > http://www.axoninstruments.co.uk > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.