1.3.2.10 1.4.2.10 1.5.2.10 1.8.2.13 1.25.1.10 1.26.1.10 1.27.2.10 1.28.2.13 1.29.2.10 1.30.2.8 1.31.2.8 1.32.2.10 1.33.2.8 1.37.2.8 1.38.2.10 1.39.1.10 1.40.2.10 1.41.1.10 ADCx_ComparisonWindowSet Function
C
void ADCx_ComparisonWindowSet(int16_t low_threshold, int16_t high_threshold); // x is instance of the peripheral and it is applicable only for devices having multiple instances of the peripheral. void ADCx_ComparisonWindowSet(uint16_t low_threshold, uint16_t high_threshold); // x is instance of the peripheral and it is applicable only for devices having multiple instances of the peripheral.
Summary
This function sets the window upper threshold and lower threshold values.
Description
This function configures the window threshold values.
Precondition
ADCx_Initialize() function must have been called first for the associated instance.
Parameters
Param | Description |
---|---|
low_threshold | 16-bit value for lower threshold |
high_threshold | 16-bit value for upper threshold |
Returns
None
Example
ADC0_Initialize(); ADC0_ComparisonWindowSet(0x100, 0x200);
Remarks
Threshold values are based on result sign mode (differential mode) and result resolution (8, 10, 12 or 16 bit) configuration.