70 Serial.print(
"\nEnter the number of CNV pulses: ");
71 while (Serial.available());
97 negative = (data.
LT_byte[2] & 0x80) != 0;
113 if (gain_compression == 1)
116 voltage = (float)adc_code;
117 voltage = voltage / (pow(2,24)-1);
118 voltage = voltage *
vref;
uint8_t LT_byte[4]
4 bytes (unsigned 8-bit integers) to be converted to a 32-bit signed or unsigned integer ...
Header File for Linduino Libraries and Demo Code.
union LT_union_int32_4bytes data
LTC2380-24: Low Noise, High Speed, 24-Bit SAR ADC With Digital Filter.
int16_t LT_int16
16-bit signed integer to be converted to two bytes
uint16_t LT_uint16
16-bit unsigned integer to be converted to two bytes
int32_t LT_int32
32-bit signed integer to be converted to four bytes
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.
int8_t spi_read(int8_t data)
The data byte to be written.
This union splits one int32_t (32-bit signed integer) or uint32_t (32-bit unsigned integer) four uint...
This union splits one int16_t (16-bit signed integer) or uint16_t (16-bit unsigned integer) into two ...
uint8_t LT_byte[2]
2 bytes (unsigned 8-bit integers) to be converted to a 16-bit signed or unsigned integer ...
float LTC2380_code_to_voltage(int32_t adc_code, uint8_t gain_compression, float vref)
Calculates the LTC2380 input voltage given the binary data and lsb weight.
void LTC2380_read(int32_t *ptr_adc_code, int16_t *ptr_cycles)
Reads the LTC2380 and returns 32-bit data in 2's complement format.