I'm looking for the Library of the ADC MCP33121 for Arduino UNO or functional code, I don't have enough tools for testing so I'd like to get some code already tested. I appreciate any help. Thanks... Josh
You don't really need a library for that chip. You just do a pair of SPI transfers with the CS pin low.
digitalWrite(pinCS, LOW); uint8_t msb = SPI.transfer(0xFF); uint8_t lsb = SPI.transfer(0xFF); digitalWrite(pinCS, HIGH); uint16_t val = (((uint16_t)msb << 8) | lsb); val = val >> 2; // For 14 bit devices shift it twice. For 12 bit do it 4 times.