Electronic – How to access the MCP3008 ADC chip with linux spidev

adcintegrated-circuitlinuxspi

There is quite a bit of bit-banging sources to work with this 10-bit resolution chip, but I'd like to know if this kind of chips are natively supported by Linux.

Primarily I'd like this to be in C, but I also accept answers in other language if written without some funky language-specific libraries.

Best Answer

It's got a SPI based interface, correct? If so, then you should be able to just write a userspace driver to interface with the chip. Did you look at Interfacing an SPI ADC (MCP3008) chip to the Raspberry Pi using C++ (spidev)?

If your hardware has SPI then your kernel should have a SPI driver loaded, and /dev/spidev* should be populated.

Related Topic