| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions
LTC2308.cpp File Reference
Analog-to-Digital Converters (ADC) » LTC2308: 12-Bit 8-Channel 200ksps ADC

Library for LTC2308: 12-Bit 8-Channel 200ksps ADC. More...

## Detailed Description

Library for LTC2308: 12-Bit 8-Channel 200ksps ADC.

Definition in file LTC2308.cpp.

Go to the source code of this file.

## Functions
void | LTC2308_read (uint8_t cs, uint8_t adc_command, uint16_t *adc_code)
| Reads the ADC and returns 16-bit data. More...
float | LTC2308_code_to_voltage (uint16_t adc_code, float vref, uint8_t uni_bipolar)
| Calculates the LTC2308 input's unipolar voltage given the binary data and lsb weight. More...

## Function Documentation

## ◆ LTC2308_code_to_voltage()

float LTC2308_code_to_voltage | ( | uint16_t | adc_code,
|  | float | vref,
|  | uint8_t | uni_bipolar
| ) |  |

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

Returns
  Floating point voltage

Parameters

  adc_code | Raw ADC code

Definition at line 84 of file LTC2308.cpp.

## ◆ LTC2308_read()

void LTC2308_read | ( | uint8_t | cs,
|  | uint8_t | adc_command,
|  | uint16_t * | adc_code
| ) |  |

Reads the ADC and returns 16-bit data.

Returns
  void

Parameters

  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 LTC2308.cpp.