This set of functions is for DC measurement mode.
◆ Cy_ADCMic_SelectDcChannel()
Sets the specified DC measurement channel.
- Parameters
-
- Note
- This function is useful for DC measurement only.
- Function Usage
◆ Cy_ADCMic_IsEndConversion()
Immediately return the status of the conversion or does not return (blocking) until the conversion completes, depending on the retMode parameter.
In blocking mode, there is a time out of about 10 seconds for a CPU speed of 100 MHz.
- Parameters
-
- Returns
-
- Side Effects
- This function reads the end of conversion status interrupt bit and clears it after.
- Note
- CY_ADCMIC_WAIT_FOR_RESULT return modes are not recommended for use in RTOS environment.
- Function Usage
◆ Cy_ADCMic_GetDcResult()
Returns the DC conversion result from the CIC status register.
- Parameters
-
base | The pointer to the hardware ADCMic block. |
- Returns
- The signed DC conversion result.
- Function Usage
◆ Cy_ADCMic_SetDcOffset()
Sets the offset value for DC measurement calibration.
- Parameters
-
◆ Cy_ADCMic_SetDcGain()
Sets the gain value for DC measurement calibration.
- Parameters
-
◆ Cy_ADCMic_CountsTo_mVolts()
Convert the ADC output to millivolts as an int16.
For example, if the ADC measured 0.534 volts, the return value would be 534. The calculation of voltage depends on the DC range. The equation used is:
mV = (RawCounts - Offset) * 1000 / Gain
where,
- RawCounts: Raw counts returned by the Cy_ADCMic_GetDcResult.
- Offset - the offset value, can be adjusted by the Cy_ADCMic_SetDcOffset, essentially it is a raw count value of the CY_ADCMIC_REFGND voltage measurement.
- 1000 - amount of millivolts in 1 volt
- Gain: the gain value, can be adjusted by the Cy_ADCMic_SetDcGain, depends on DC range, essentially it is an amount of raw counts per 1 volt of input voltage.
- Note
- This function is for DC measurement only.
- Parameters
-
- Returns
- Result in millivolts.
- Function Usage
◆ Cy_ADCMic_CountsTo_uVolts()
Convert the ADC output to microvolts as an int32.
For example, if the ADC measured 0.534 volts, the return value would be 534000. The calculation of voltage depends on the DC range. The equation used is:
uV = (RawCounts - Offset) * 1000000 / Gain
where,
- RawCounts: Raw counts returned by the Cy_ADCMic_GetDcResult.
- Offset - the offset value, can be adjusted by the Cy_ADCMic_SetDcOffset, essentially it is a raw count value of the CY_ADCMIC_REFGND voltage measurement.
- 1000000 - amount of microvolts in 1 volt
- Gain: the gain value, can be adjusted by the Cy_ADCMic_SetDcGain, depends on DC range, essentially it is an amount of raw counts per 1 volt of input voltage.
- Note
- This function is for DC measurement only.
- Parameters
-
- Returns
- Result in microvolts.
- Function Usage
◆ Cy_ADCMic_CountsTo_Volts()
Convert the ADC output to volts as a float.
For example, if the ADC measured 0.534 volts, the return value would be 0.534. The calculation of voltage depends on the DC range. The equation used is:
V = (RawCounts - Offset) / Gain
where,
- Note
- This function is for DC measurement only.
- Parameters
-
- Returns
- Result in volts.
- Function Usage