91 uint16_t dummy_command = 0;
102 adc_code = adc_code << shift;
104 voltage = (float)adc_code;
105 voltage = voltage / (pow(2,16)-1);
106 voltage = voltage *
vref;
LTC2312-12: 12-Bit, 500Ksps ADC.
float LTC2315_code_to_voltage(uint16_t adc_code, uint8_t shift, float vref)
Calculates the LTC2315 input voltage given the binary data and lsb weight.
Header File for Linduino Libraries and Demo Code.
void LTC2315_read(uint8_t cs, uint16_t *adc_code)
Reads the LTC2315 and returns 32-bit data in offset binary format.
void spi_transfer_word(uint8_t cs_pin, uint16_t tx, uint16_t *rx)
Reads and sends a word.
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.