Part Number: TMS320F28335
Tool/software: Code Composer Studio
I sample two signals at the sampling rate of 8000Hz. I need to subtract signal 2 from signal 1, but I don't want to create two variables so I do the following code:
Udig[i] = (AdcRegs.ADCRESULT0>>4) - (AdcRegs.ADCRESULT2>>4);
But the result of Udig[I] is not the difference between them, but it's the data from (AdcRegs.ADCRESULT0>>4)
I want to ask if the calculation of multiple ADCRESULT registers in one line is possible? And which is the most optimal way to do so?