03-16-2013 10:19 AM
So I've been looking through the firmware trying to find out where to change settings like how to choose clock divider and analog voltage reference, but I can't seem to find it. I have tried to put the commands for these settings in the viod setup function, but they are being overwritten somewhere. But where?
I also noticed that in LabVIEW, the analog read pin value is automatically calculated with the 5 V reference. Where can I change this. I would like to get the raw data from the ADC if possible, so I can scale it according to my external voltage reference.
Thanks in advance
Psii
edit: A workaround to the latter problem I have been using is just to devide the number by 5 and multiply with my AREF. This works, but I would prefer the raw data in.
03-18-2013 04:25 PM
The raw ADC tick count is returned to LabVIEW and the AnalogRead VI scales it assuming a 5V ref by multiplying it by .0049 (5v / 10-bit ADC = .0049 V/Tick).
You can simply change that constant the convert the ticks to volts based on your ref. If you use a physical analog reference wired to the aref pin you shouldn't need to change anything in the firmware, just the single constant in LV.
Let us know if this helps.
-Sam K
LIFA Developer
03-19-2013 03:18 AM
Tank you for your reply.
I am new to LV, seeing as it was a no-brainer 😃
However, I would still like to use the clock divider. Can I do this from LabVIEW or do I need to edit the case-statement of the analogRead?
edit.: I forgot to mention that your suggestion worked
03-19-2013 09:17 AM
Which clock divider are you refering to?
-Sam K
LIFA Developer