28.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 28-4, Equation 28-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), (49.5V – 46.5V) - (46.5V – 46.5V) = 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.
BIASCONbits.ISELOUT1 = 0b010; // set the 50 uA source on channel 1