-
15. Re: ADC Measuring Wrong Value
JoMe_264151 Mar 11, 2015 3:51 PM (in response to tovac_285016)Did you set the project build from "Debug" to "Release" having a much stronger optimization level? Debugging is barely possible with that setting, but if that works I can help you further...
Bob
-
16. Re: ADC Measuring Wrong Value
tovac_285016 Mar 11, 2015 4:03 PM (in response to tovac_285016)It worked! However, now I have the other version working fine using much less memory and debuggable, so I will probably use that for my data logger for now.
Thanks for all the help, once again, I walked away slightly more knowledgeable.
Tom
-
17. Re: ADC Measuring Wrong Value
JoMe_264151 Mar 11, 2015 4:20 PM (in response to tovac_285016)There is a (bit time-consuming) way to get all you want: By right-clicking on a generated C-file you may select "Build Settings" from which you can now select for this file the "Release" compile. This will reduce flash usage for all the files you do not need to debug.
Bob
-
18. Re: ADC Measuring Wrong Value
DaKn_263916 Mar 11, 2015 5:10 PM (in response to tovac_285016)Tom, would you mind posting your "final" working project. I have a
son that wants to put a data logger on his Motot Guzzi bike to optimize
tuning, and it would be handy if I do not have to re-invent the wheel.
Regards, Dana.
-
19. Re: ADC Measuring Wrong Value
tovac_285016 Mar 12, 2015 8:58 AM (in response to tovac_285016)Hi,
See the project attached below. It is full of quesitonable code, I am sure, but it works great, and I just got my results off of the SD card and are working with them in an Excel spreadsheet right now. The project currently measures some data for a solar powered lighting project I am working on, but it will be nice to have a custom data logger on hand for future projects.
Thank you,
Tom
-
DataLogger2.zip 4.4 MB
-
-
20. Re: ADC Measuring Wrong Value
rola_264706 Mar 12, 2015 3:55 PM (in response to tovac_285016)The internal reference can be brought out for other uses on the ADC. You just need to select internal reference 1.024V bypassed and I would add a op amp buffer to prevent loading of the reference.
-
21. Re: ADC Measuring Wrong Value
helic_263931 Mar 12, 2015 5:52 PM (in response to tovac_285016)But even then its available only on the external pin, not for internal routing.
-
22. Re: ADC Measuring Wrong Value
DaKn_263916 Mar 12, 2015 7:09 PM (in response to tovac_285016)If you abandon Vdda as Vref then of course you will need external
R dividers to handle the higher Vxin you want to measure. But
you would gain a net higher accuracy by using the internal Vref and
precision thin film Rdivider.
Regards, Dana.
-
23. Re: ADC Measuring Wrong Value
DaKn_263916 Mar 14, 2015 11:34 PM (in response to tovac_285016)Intdernal reference -
Its 2 %, maybe use an accurate external Vref to power Vdd and eliminate R dividers on
input pins. 2% is ~ 6 bits, food for thought. Or use ext ref directly on SAR.
Regards, Dana.