SSDA010 August   2025 MSPM0G3507

 

  1.   1
  2. 1Description
  3. 2Required Peripherals
  4. 3Design Steps
  5. 4Design Considerations
  6. 5Software Flow Chart
  7. 6Device Configuration
  8. 7Application Code
    1. 7.1 Application Code – Cascaded Signal Computation
  9. 8Results
  10. 9Additional Resources
  11.   Trademarks

Application Code – Cascaded Signal Computation

A key part of this subsystem's functionality is computing the fully cascaded signal output, represented as G1 × G2 × Vin. This is handled in the cascade_input_voltage() function, which reconstructs the total amplified input by accounting for both op amp stages and the bias voltages applied through DACs.

MSPM0G3507 Cascade_Input_Voltage() Code Figure 7-2 Cascade_Input_Voltage() Code

The mathematical model behind the computation is:

Equation 1. (G1 × G2 × Vin1) = Vout2 + ((1 + G1) × G2 × Vdac1) × 24 - ((1 + G2) × Vdac2 × 24

Derived from the combination of

Equation 2. Vout1 = -G1 × Vin1 + (1 + G1) × Vdac1
Equation 3. Vout2 = -G2 × Vout1 + (1 + G2) × Vdac2

Where:

  • G1 and G2 are the gains of the first and second op amp stages.
  • Vout1 and Vout2 are the outputs of the first and second-stage amplifiers (OPA0 and OPA1).
  • Vdac1 and Vdac2 are the bias voltages applied to OPA0 and OPA1 respectively through DAC8_0 and DAC8_1.

This equation compensates for the effects of both DAC-induced offsets in each stage and reconstructs the true input signal as if no offset biasing had occurred. The use of a left shift (<< 4) in the code accounts for the 8-bit DAC's limited resolution when scaled back to a 12-bit context, as each DAC value must be multiplied by 16 (for example, 24) to align with the full ADC range. This reconstructed signal is then transmitted via UART, providing the host system with a DC-compensated representation of the original input voltage, scaled by the configured system gains