The Lyrtech information states that the input range is 7 Vpp and the output range is 3.1 Vpp for their A/D and D/A inputs and outputs respectively.
I want to convert an input digital word to the input voltage and also convert a voltage (internal DSP calculation) into the proper digital word to be sent out.
My input equation is
uin = voltageScaling * (double) (dmaxAdcBuffer >> 8) - kVoltageLimit;
dmaxAdcBuffer is declared as a Uint32. I think that the data should be in the upper 24 bits as it's left justified. kVoltageLimit = 3.5 and voltageScaling = (2 * kVoltageLimit) / (16777216). Note that 16777216 = 2 to the 24.
I am implementing 4th order discrete state-space equations which basically act as a lowpass filter with unity gain. Ideally, the output should be equal to the input with some delay.
My output equation is
dmaxDacBuffer = ((Uint32)floor ((yout1 + kVoltageLimit) / voltageScaling)) << 8;
I am wondering if I am off base in my scaling. If so, any help in the right direction would be appreciated.