2

I was reading some values from a function generator using the MCP3008 ADC, however, I got 5 times as many samples with the spi device library than I did with Adafruit's MCP3008. Why is that the case? It seems that because Adafruit's library is specific to MCP3008, it should be faster, but is not.

1 Answers1

3

The SPI library uses the SPI hardware.

I suspect the Adafruit code was written before the SPI library was written and uses a technique called bit banging to access the MCP3008. Bit banging will be much slower than using the SPI hardware.

joan
  • 71,014
  • 5
  • 73
  • 106