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.
Hello,
Currently I need to interface ADS1118 to linux based system.
I need Linux driver for ADS1118 and also It will be good to have some reference example application code for it.
Could you please provide it?
Best Regards,
KD
Hello KD,
We don't publish any linux drivers for the ADS1118, but we do have some example code here: https://www.ti.com/tool/download/SBAC288
This other post also mentions drivers for the ADS124S08 that you may be able to adapt: https://e2e.ti.com/support/data-converters-group/data-converters/f/data-converters-forum/1192896/ads1118-ads1118-linux-driver
Let me know if you have any more questions,
Levi DeVries
Hello Levi Devries,
I am Ritesh Prajapati working with KD into same project.
Thanks for your quick response with details provided.
We will check links with details provided from your end and will let you know if any further query for the same.
Our main purpose to use ADS1118 is because we need at-least 4 channels into our current product while we have only 2 channels supported from hardware and module itself. That is the reason that we have selected ADS1118 using which we can get at-least 4 channels from SPI because we have SPI Interface available on our board.
Regards,
Ritesh Prajapati
Hello Levi Devries,
I have added hwmon driver for ads1118.
Also done changes in Kconfig, Make file and dtsi file.(Currently used EC20 modules with quecopen sdk linux kernel is 3.18.20).
Now I'm able to get interfaces for all 4 channels and temperature sensor.
Getting interface at /sys/bus/spi/devices/spi6.0/hwmon/hwmon8/
But not getting result on channels.
Getting random readings when ADS1118 module is connected to EC20.
And getting zeros when we power down ADS1117 module.
For your reference I added ADS1118 driver with taking reference from this:
https://lkml.iu.edu/hypermail/linux/kernel/1607.1/05849.html
Thank you,
KD
Hello KD,
I am unfamiliar with the configuration you mentioned, but before diving into that I would recommend you take the time to check the SPI communication on the ADS1118 communication lines with an oscilloscope or logic analyzer so that you can verify the data is reaching the processor correctly in the first place. This may also help you to understand any software problems related to how the communication is taking place.
If you post screenshots of these measurements I can also help you take a look at them.
Thanks,
Levi DeVries
Hello Levi Devries,
During verification found that CS pins was not properly driven, may be some hardware issue.
I changed ADS1118 module, Now it is working,
Thank you very much for your support.