ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the firmware

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.

0 Kudos
Message 1 of 4
(3,715 Views)

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

0 Kudos
Message 2 of 4
(3,284 Views)

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

0 Kudos
Message 3 of 4
(3,284 Views)

Which clock divider are you refering to?

-Sam K

LIFA Developer

0 Kudos
Message 4 of 4
(3,284 Views)