Re: dynamic C programming
"petermcs" <petermcs-/[email protected]>
| Newsgroups | gmane.comp.hardware.rabbit-semiconductor |
|---|---|
| Message-ID | <[email protected]> |
Hi Ron, The line of code in question is applying a calibration factor in the form of an offset and a gain factor to translate the raw value into a correct voltage. This is done by subtracting the offset (for the appropriate channel) from the raw value and then scaling with the appropriate gain. _adcCalibS is a 2 dimensional array of calibration structs which is organised by channel first and then gain code. Regards, Peter --- In [email protected], "reis6805" <nth_degree@...> wrote: > > I am new to C programming in general. Can anyone explain the arguments of this, > voltage = (value - _adcCalibS[channel][GAINSET].offset)*(_adcCalibS[channel][GAINSET].kconst) > I am sure the answer is obvious to all but me..... > > This is from the A to D converter routine using RCM3400. > > Thanks, > Ron >