Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Library for LTC1859: 16-Bit 8-Channel 200ksps ADC. More...

Detailed Description

Library for LTC1859: 16-Bit 8-Channel 200ksps ADC.

Definition in file LTC1859.cpp.

Go to the source code of this file.

Functions

uint8_t LTC1859_build_command (uint8_t ch_designate, uint8_t uni_bipolar, uint8_t range_low_high)
 Builds the ADC command and returns an 8 bit command. More...
 
void LTC1859_read (uint8_t cs, uint8_t adc_command, uint16_t *adc_code)
 Reads the ADC and returns 16-bit data. More...
 
float LTC1859_code_to_voltage (uint16_t adc_code, float vref, uint8_t range_low_high, uint8_t uni_bipolar)
 Calculates the LTC1859 input's unipolar voltage given the binary data and lsb weight. More...
 

Function Documentation

◆ LTC1859_build_command()

uint8_t LTC1859_build_command ( uint8_t  ch_designate,
uint8_t  uni_bipolar,
uint8_t  range_low_high 
)

Builds the ADC command and returns an 8 bit command.

Returns
8 bit command

Definition at line 77 of file LTC1859.cpp.

◆ LTC1859_code_to_voltage()

float LTC1859_code_to_voltage ( uint16_t  adc_code,
float  vref,
uint8_t  range_low_high,
uint8_t  uni_bipolar 
)

Calculates the LTC1859 input's unipolar voltage given the binary data and lsb weight.

Returns
Floating point voltage
Parameters
adc_codeRaw ADC code
range_low_high)

Definition at line 93 of file LTC1859.cpp.

◆ LTC1859_read()

void LTC1859_read ( uint8_t  cs,
uint8_t  adc_command,
uint16_t *  adc_code 
)

Reads the ADC and returns 16-bit data.

Returns
void
Parameters
csChip Select Pin
adc_commandChannel address, config bits ORed together
adc_codeReturns code read from ADC (from previous conversion)

Definition at line 86 of file LTC1859.cpp.