![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
noyz
Joined: 31 Jan 2009 Posts: 59
|
need some help-vref |
Posted: Tue Jul 28, 2009 4:12 am |
|
|
I want to use vref for better precision. I have a signal which has the vref at 1v. I was thinking putting vref 2V. I read in CCS Help that I can do that with
Code: |
setup_vref (VREF_HIGH | 6);
// At VDD=5, the voltage is 2.19V |
Do I have to connect a Zener diode on VREF+ on the PIC?
I'm using pic 16f88. Can I use as a input the vref+ ?
Or is dedicated for vref since I use vref ? |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Tue Jul 28, 2009 8:03 am |
|
|
Better precision for what?.
I suspect from your mentioning Vref+, that you are possibly getting confused about the modules.
The _internal_ Vref (which is the component controlled by the setup_vref parameter), is for use with the comparator module. It does not use the Vref+ pin at all. It's output, is available on the Vref- pin. It is only a voltage divider 'tree', from the existing supply rail, and has no more accuracy.
For greater accuracy on the ADC, you can use an _external_ reference voltage, on the Vref+ input, or a between Vref+, and Vref-. If doing this, you want something a lot more accurate than a normal Zener. Typically, modern 5v voltage regulators, give at worst perhaps +/-5% accuracy, and versions are normally available with +/-1% specifications. To improve on this, and get 10 bit accuracy from the ADC, requires a voltage reference better than 0.05% accurate. This is typically available from a bandgap reference. Typical Zener diodes, only manage +/-10% to a 'best' of perhaps +/-2.5%, and this only with certain voltages where the diode becomes self correcting for temperature changes.
Beware also, that for the ADC, the _minimum_ Vref, warranted to give 10bit accuracy, is 2.2v (or 2.5v, for the full industrial temperature range).
If you are using an external Vref, then the Vref pin, is the dedicated input for the external reference voltage. You can't use the pin for anything else.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|