----- Original Message ----- From: "Brandon Stewart" To: Sent: Friday, June 28, 2002 8:11 PM Subject: [PIC]: How to set up a Vref on RA3 of a 16F877? > I have looked at the 877 datasheet, but I only see how to configure RA3 as > Vref+. They don't ever explain what this means!? Does this mean that All > your other A/D inputs can't exceed Vref or what? Is this done is software > or something. How do you set it up, and what implications does it have? > > > > Thanks, > Brandon > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > +Vref and -Vref are the references voltage for your A/D input, the output would be 0xFF if your A/D input is at +Vref, and 0X00 if it is at -Vref. +Vref and-Vref are useful when you have to measure a small range of voltage, say, 1.2-2.5V. Just pull your -Vef to 1.2V and +Vref to 2.5, it will give you more dynamic range than using Vcc as +Vref. And also, if your +Vref is tied to Vcc which tends to fluctuate, you will not get the correct voltage reading. I have this personal experience with A/D input voltage exceeding Vcc without proper current limiting resistor, the PIC heats up, but no smoke and that single channel malfunctioned, the rest still works fine. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.