Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I am working in a design having a SAR ADC and AMUX. Check the picture attached for the schematic.
ADC is single ended, internal VREF 1.024, Bypassed, range 0-2.048V.
I have three small questions regarding this subsystem:
(1) To calculate ADC offset I have connected the last channel of the AMUX (COL_9) to VSSA (externally, on the PCB) and use the following code
adcReading = ADC_SAR_GetResult16();
Do you think is this correct?
(2) Should I do anything similar to calculate the ADC_SetScaledGain()? In the ADC datasheet, it says:
"It should only be used to further calibrate the ADC with a known input or if the ADC is using an external reference."
In case yes, What do suggest me?
(3) On the AMUX datasheet, AMUX_FastSelect command seems to take 4 us to set the new channel (Table 1, pag8) for a 48Mhz Clock, so, as I am using a 24Mhz clock, I have added a CyDelayUS(10) on the code above. Is this correct? More or less time?