function adc2m

Post your VB and VBA discussions here
Post Reply
john.hestia
Newbie
Posts: 0
Joined: Wed Nov 09, 2011 11:53 am

function adc2m

Post by john.hestia »

Function adc2mV(value As Long) As Long

' calculate value depending on number of bits
adc2mV = value * 2500000# / 8388608

End Function


Hi to Anyone,

Please explain what is the meaning of function above, appreciate your prompt reply.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: function adc2m

Post by Martyn »

It will be converting the AD count from the device to a voltage according to the chosen range. 8388608 the maximum value for the number of bits (24 bit), and 2500000 is related to the range (+- 2.5V) which someone has hard coded in.
Martyn
Technical Support Manager

john.hestia
Newbie
Posts: 0
Joined: Wed Nov 09, 2011 11:53 am

Re: function adc2m

Post by john.hestia »

Thank you very much Martyn!

Post Reply