View previous topic :: View next topic |
Author |
Message |
dave.t Guest
|
12f675 a/d conversion resolution |
Posted: Thu Mar 27, 2003 8:43 am |
|
|
Hi all
I am about to use the 12f675. Can I reduce the resolution of the a/d converter from 10 to 8 bits via the reference voltage pin? If so how is this done.
Many thanks.
Dave
___________________________
This message was ported from CCS's old forum
Original Post ID: 13135 |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: 12f675 a/d conversion resolution |
Posted: Thu Mar 27, 2003 11:32 am |
|
|
:=Hi all
:=
:=I am about to use the 12f675. Can I reduce the resolution of the a/d converter from 10 to 8 bits via the reference voltage pin? If so how is this done.
------------------------------------------------------------
You can truncate the result to just the upper 8 bits by
using the CCS adc=8 directive. Will that do what you want ?
Example:
#include "c:\Program Files\Picc\Devices\12F675.h"
#device adc=8
main()
{
char c;
// Put adc setup code here.
c = read_adc(); // Get 8 bit result
while(1);
}
___________________________
This message was ported from CCS's old forum
Original Post ID: 13150 |
|
![](templates/subSilver/images/spacer.gif) |
dave.t Guest
|
Re: 12f675 a/d conversion resolution |
Posted: Fri Mar 28, 2003 4:06 am |
|
|
:=:=Hi all
:=:=
:=:=I am about to use the 12f675. Can I reduce the resolution of the a/d converter from 10 to 8 bits via the reference voltage pin? If so how is this done.
:=------------------------------------------------------------
:=
:=You can truncate the result to just the upper 8 bits by
:=using the CCS adc=8 directive. Will that do what you want ?
:=Example:
:=
:=#include "c:\Program Files\Picc\Devices\12F675.h"
:=#device adc=8
:=
:=main()
:={
:=char c;
:=
:=// Put adc setup code here.
:=
:=c = read_adc(); // Get 8 bit result
:=
:=while(1);
:=}
:=
:=
Hi PCM
Maybe what I should of said was how do applied voltages to the reference input affect the resolution of the converter when using an external voltage referance.
Many thanks.
Dave
___________________________
This message was ported from CCS's old forum
Original Post ID: 13183 |
|
![](templates/subSilver/images/spacer.gif) |
R.J.Hamlett Guest
|
Re: 12f675 a/d conversion resolution |
Posted: Fri Mar 28, 2003 6:12 am |
|
|
:=:=:=Hi all
:=:=:=
:=:=:=I am about to use the 12f675. Can I reduce the resolution of the a/d converter from 10 to 8 bits via the reference voltage pin? If so how is this done.
:=:=------------------------------------------------------------
:=:=
:=:=You can truncate the result to just the upper 8 bits by
:=:=using the CCS adc=8 directive. Will that do what you want ?
:=:=Example:
:=:=
:=:=#include "c:\Program Files\Picc\Devices\12F675.h"
:=:=#device adc=8
:=:=
:=:=main()
:=:={
:=:=char c;
:=:=
:=:=// Put adc setup code here.
:=:=
:=:=c = read_adc(); // Get 8 bit result
:=:=
:=:=while(1);
:=:=}
:=:=
:=:=
:=
:=Hi PCM
:=
:=Maybe what I should of said was how do applied voltages to the reference input affect the resolution of the converter when using an external voltage referance.
:=Many thanks.
:=
There is a spec given for the chips, that lists 2v, as the minimum reference voltage span to give 10bit resolution. This presumably implies that the converter has a minimum detection threshold/step at about 2mV, which would tend to imply that the minimum Vref range compatible with an 8bit resolution, is in the order of 0.5v. However the data sheets do not say how the accuracy decays below this 2v threshold...
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 13189 |
|
![](templates/subSilver/images/spacer.gif) |
dave.t Guest
|
Re: 12f675 a/d conversion resolution |
Posted: Fri Mar 28, 2003 8:29 am |
|
|
:=:=:=:=Hi all
:=:=:=:=
:=:=:=:=I am about to use the 12f675. Can I reduce the resolution of the a/d converter from 10 to 8 bits via the reference voltage pin? If so how is this done.
:=:=:=------------------------------------------------------------
:=:=:=
:=:=:=You can truncate the result to just the upper 8 bits by
:=:=:=using the CCS adc=8 directive. Will that do what you want ?
:=:=:=Example:
:=:=:=
:=:=:=#include "c:\Program Files\Picc\Devices\12F675.h"
:=:=:=#device adc=8
:=:=:=
:=:=:=main()
:=:=:={
:=:=:=char c;
:=:=:=
:=:=:=// Put adc setup code here.
:=:=:=
:=:=:=c = read_adc(); // Get 8 bit result
:=:=:=
:=:=:=while(1);
:=:=:=}
:=:=:=
:=:=:=
:=:=
:=:=Hi PCM
:=:=
:=:=Maybe what I should of said was how do applied voltages to the reference input affect the resolution of the converter when using an external voltage referance.
:=:=Many thanks.
:=:=
:=There is a spec given for the chips, that lists 2v, as the minimum reference voltage span to give 10bit resolution. This presumably implies that the converter has a minimum detection threshold/step at about 2mV, which would tend to imply that the minimum Vref range compatible with an 8bit resolution, is in the order of 0.5v. However the data sheets do not say how the accuracy decays below this 2v threshold...
:=
:=Best Wishes
Dear R.J.
Just got the electrical specs. on the 12f675 and it does confirm what you said - thanks for you help.
Regards.
Dave
___________________________
This message was ported from CCS's old forum
Original Post ID: 13198 |
|
![](templates/subSilver/images/spacer.gif) |
R.J.Hamlett Guest
|
Re: 12f675 a/d conversion resolution |
Posted: Fri Mar 28, 2003 9:03 am |
|
|
:=:=:=:=:=Hi all
:=:=:=:=:=
:=:=:=:=:=I am about to use the 12f675. Can I reduce the resolution of the a/d converter from 10 to 8 bits via the reference voltage pin? If so how is this done.
:=:=:=:=------------------------------------------------------------
:=:=:=:=
:=:=:=:=You can truncate the result to just the upper 8 bits by
:=:=:=:=using the CCS adc=8 directive. Will that do what you want ?
:=:=:=:=Example:
:=:=:=:=
:=:=:=:=#include "c:\Program Files\Picc\Devices\12F675.h"
:=:=:=:=#device adc=8
:=:=:=:=
:=:=:=:=main()
:=:=:=:={
:=:=:=:=char c;
:=:=:=:=
:=:=:=:=// Put adc setup code here.
:=:=:=:=
:=:=:=:=c = read_adc(); // Get 8 bit result
:=:=:=:=
:=:=:=:=while(1);
:=:=:=:=}
:=:=:=:=
:=:=:=:=
:=:=:=
:=:=:=Hi PCM
:=:=:=
:=:=:=Maybe what I should of said was how do applied voltages to the reference input affect the resolution of the converter when using an external voltage referance.
:=:=:=Many thanks.
:=:=:=
:=:=There is a spec given for the chips, that lists 2v, as the minimum reference voltage span to give 10bit resolution. This presumably implies that the converter has a minimum detection threshold/step at about 2mV, which would tend to imply that the minimum Vref range compatible with an 8bit resolution, is in the order of 0.5v. However the data sheets do not say how the accuracy decays below this 2v threshold...
:=:=
:=:=Best Wishes
:=
:=
:=Dear R.J.
:=Just got the electrical specs. on the 12f675 and it does confirm what you said - thanks for you help.
:=Regards.
:=Dave
I know somebody who did a 'compass' application, running the AD with 1v reference, and he hadn't spotted this limit, and was puzzled when it failed to give the full resolution he expected. It'd be really interesting, to quantify how the accuracy does decline at lower voltages.
Hope you work out how far you can go with the resolution you need.
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 13201 |
|
![](templates/subSilver/images/spacer.gif) |
|