Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Library for LTC2302: 12-Bit, 1-Channel 500ksps SAR ADC with SPI Interface. More...

Detailed Description

Library for LTC2302: 12-Bit, 1-Channel 500ksps SAR ADC with SPI Interface.

Definition in file LTC2302.cpp.

Go to the source code of this file.

Functions

void LTC2302_read (uint8_t cs, uint16_t adc_command, uint16_t *adc_code)
 Reads the ADC and returns 16-bit data. More...
 
float LTC2302_code_to_voltage (uint16_t adc_code, float vref, uint8_t uni_bipolar)
 Calculates the LTC2302 input voltage given the data, range, and unipolar/bipolar status. More...
 

Function Documentation

◆ LTC2302_code_to_voltage()

float LTC2302_code_to_voltage ( uint16_t  adc_code,
float  vref,
uint8_t  uni_bipolar 
)

Calculates the LTC2302 input voltage given the data, range, and unipolar/bipolar status.

Returns
Floating point voltage
Parameters
adc_codeRaw ADC code
vrefReference voltage
uni_bipolarChoice of unipolar/bipolar

Definition at line 84 of file LTC2302.cpp.

◆ LTC2302_read()

void LTC2302_read ( uint8_t  cs,
uint16_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 77 of file LTC2302.cpp.