87 uint16_t dummy_command = 0;
101 adc_code = adc_code << 2;
103 voltage = (float)adc_code;
104 voltage = voltage / (pow(2,16)-1);
105 voltage = voltage *
vref;
Header File for Linduino Libraries and Demo Code.
LTC2360-12: 12-Bit, 100Ksps ADC.
void LTC2366_read(uint8_t cs, uint16_t *ptr_adc_code)
Reads the LTC2366 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.
float LTC2366_code_to_voltage(uint16_t adc_code, float vref)
Calculates the LTC2366 input voltage given the binary data and lsb weight.