1.34.1.10 AFECx_ChannelGainSet Function
C
void AFECx_ChannelGainSet (AFEC_CHANNEL channel, AFEC_CHANNEL_GAIN gain) // x - Instance of the AFEC peripheral
Summary
Writes the gain of the channel
Description
This function writes the gain of the channel
Precondition
AFECx_Initialize() must have been called first for the associated instance.
Parameters
Param | Description |
---|---|
channel | channel number |
gain | channel gain of the amplifier |
Returns
None.
Example
AFEC0_Initialize();
AFEC0_ChannelGainSet(AFEC_CH0, AFEC_CHANNEL_GAIN_2X);
Remarks
Input voltage range reduces as gain increases. For gain = 1, range is (0) to (Vref) For gain = 2, range is (Vref/4) to (3 * Vref/4) For gain = 4, range is (3 * Vref/8) to (5 * Vref/8)