![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Library for LTC2302: 12-Bit, 1-Channel 500ksps SAR ADC with SPI Interface. More...
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... | |
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.
adc_code | Raw ADC code |
vref | Reference voltage |
uni_bipolar | Choice of unipolar/bipolar |
Definition at line 84 of file LTC2302.cpp.
void LTC2302_read | ( | uint8_t | cs, |
uint16_t | adc_command, | ||
uint16_t * | adc_code | ||
) |
Reads the ADC and returns 16-bit data.
cs | Chip Select Pin |
adc_command | Channel address, config bits ORed together |
adc_code | Returns code read from ADC (from previous conversion) |
Definition at line 77 of file LTC2302.cpp.