This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADC081C021SW-LINUX: Need Linux sample driver for "ADC081C021 I2C-Compatible, 8-Bit Analog-to-Digital Converter with Alert Function"

Part Number: ADC081C021SW-LINUX
Other Parts Discussed in Thread: ADC081C021, ADC081C027


We are working on custom embedded design with use of "ADC081C021/ADC081C027 I2C-Compatible, 8-Bit Analog-to-Digital Converter with Alert Function" for end POT switch used as "P160KNP-0QC20B10K".

We tried to get driver for the same in latest linux systems, but didn't get the same which has implementation of Alert line and thresholds implementation.

About our SW, we are using kernel 4.14.96 of OE linux (Linaro).

Kindly help to share the sample driver for this I2C chip with Alert line function (including threshold use case).


Ashish Agarwal

  • Hello,

    The drivers we have available to support the ADC081C021 can be found in the following link:

    This is meant to support communication to the device.

    If there are fixes or code enhancement, follow the link to send them to the relevant Linux Kernel community



  • Hello Cynthia,

     Thanks for your quick reply and comment over it earlier. I got your point and indication. 

     About the default driver, yes we had already checked that and confirmed that yes that could be used as first steps. Even if we don't want to use the facility of ALERT line / Threshold that driver could be used.

    The driver which has only basic Read function for I2C was/ is there and we are already knew that.

    Our requirement is to get the below points : 

    1. Alert line & Threshold values use cases example and user manual
    2. Trade off and values for threshold settings, like it is recommended to use +-5% or +-10% for use case of attaching this ADC with POT for Audio volume knob.
        Like in case of current reading is 65% then it is recommended to use 60 & 70 as down / Upper threshold values.

    In general this ADC specialty is having ALERT LINE and allowing Threshold settings only, Hence there is no driver support for the same is really astonishing.


    Ashish Agarwa

  • Hello,

    To get readings in percentage, you will need to calculate it from the full scale being used as the ADC reads on voltage.

    Say that you are 5V as the analog input full scale. Which then puts 65% of FSR at 5*.65 = 3.25V

    This device has a signal to noise ratio of 49dB. This can be used to back calculate the noise using the equation, and using the full scale input of 5V

    Which then gives a an RMS noise of about 18mV, this in Vpp = 50mV

    If you need to then reference this back to percentages, then Vpp is a total of .05*100/5 = 1% of the total full scale range. In other words, the Vpp of 50mV is 1% of the full scale range of 5V

    This means you should set your trigger outside the noise window wider than 1%, I would suggest 2% if your system accuracy can support it.

    Granted, this is considering the minimum noise that the device will experience, but achieve this there are other factors that need to be considered. Is layout optimized, is the power supply noisy, is the POT being used contributing noise. All these factors can contribute noise.