On Sat, Jun 01, 2002 at 06:56:34PM -0400, Michael A. Powers wrote: > Hi All, > > I'm using the PIC 16F877's ADC unit to determine voltages, and I want a > Vref+ of 24V. Is this possible? Nope. > The datasheet seems to say no, but I'm not sure. Be sure. The answer is no. > The maximum value of Vref+ is stated as AVdd + 0.3, but I'm not sure > what "AVdd" is. What is meaning of the "A" in AVdd? Not sure. But it doesn't matter. Here why: PIC I/O pins have clamping diodes to Vdd and Vss. This includes the pins that are used for A/D. The diodes will shunt excess voltage to their corresponding rail. So it doesn't matter what AVdd represents. > Then again, the spec > also says that Vref+ - Vref- can be no more than Vdd + 0.3. Correct me if I > am wrong, but it seems that I cannot use a 24V input direct to the ADC. Right. > I suppose I'll have to use a voltage divider to get the input's max to > something within specifications, but is there a better way? Nope. It's the only way. Voltage divide into the range, then measure. BAJ -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads