94 voltage = (float)adc_code;
95 voltage = voltage / (pow(2,16)-1);
96 voltage = voltage *
vref;
97 voltage = voltage / gain;
static uint8_t rejection_mode
The LTC2498 rejection mode settings.
void LTC2480_read(uint8_t cs, uint32_t *ptr_adc_code)
Reads the LTC2480 and returns 24-bit data.
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.
uint32_t LT_uint32
32-bit unsigned integer to be converted to four bytes
union LT_union_int32_4bytes data
void LTC2480_set_modes(uint8_t cs, uint8_t gain_selection, uint8_t rejection_mode)
Function to set the input voltage gain and frequency rejection mode.
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.
This union splits one int32_t (32-bit signed integer) or uint32_t (32-bit unsigned integer) four uint...
float LTC2480_code_to_voltage(uint32_t adc_code, float vref, uint8_t gain)
Calculates the LTC2480 input voltage given the binary data, reference voltage and input gain...
void spi_transfer_byte(uint8_t cs_pin, uint8_t tx, uint8_t *rx)
Reads and sends a byte.
void spi_transfer_block(uint8_t cs_pin, uint8_t *tx, uint8_t *rx, uint8_t length)
Reads and sends a byte array.