EasyManua.ls Logo

Texas Instruments C2000

Texas Instruments C2000
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Converting ADC Results into IQ Format
C2000 Microcontroller Workshop - Numerical Concepts 8 - 27
#if MATH_TYPE == IQ_MATH
#define AdcFsVoltage _IQ(3.3) // ADC full scale voltage
#else // MATH_TYPE is FLOAT_MATH
#define AdcFsVoltage _IQ(3.3/4096.0) // ADC full scale voltage
#endif
_iq Result; // ADC result
void main(void)
{
Result = _IQmpy(AdcFsVoltage, _IQ12toIQ( (_iq)AdcResult.ADCRESULT0));
}
Can a Single ADC Interface Code Line be
Written for IQmath and Floating-Point?
*
does
nothing
FLOAT_MATH
behavior:
float

Table of Contents

Other manuals for Texas Instruments C2000

Related product manuals