30.5.1 Voltage Shifting for a Positive Input Voltage
To shift a positive input voltage, a single CBG source is used. The source is used to generate a negative voltage to offset the input signal. Figure 30-4, Equation 30-3 and Single-Ended Positive Voltage Shift with 50 µA Selection show the calculations and configuration for this application.
VINMIN = – 24V – (3V/2) = – 25.5V
VINMAX = – 24V + (3V/2) = – 22.5V
VSHIFT = |VINMIN|
RSHIFT = 25.5V/50 μA = 510 kOhm
Shift with standard value resistor is 511k × 50 μA = 25.55V
Input range = (VINMAX – VSHIFT) - (VINMIN – VSHIFT), (-22.5 + 25.5) - (-25.5 + 25.5) = 3V
Single-Ended Positive Voltage Shift with 50 µA Selection
3V p-p Signal with a -24V Offset:
// sample code to enable 50 uA current source.
IBIASCONbits.ISELOUT1 = 0b010; // set the 50 uA source on channel 1
