| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions
LTC2348.cpp File Reference
Analog-to-Digital Converters (ADC) » LTC23XX: 16/18-Bit Differential Input SoftSpan ADC with Wide Input Common Mode Range.

Library for LTC23XX: 16/18-Bit Differential Input SoftSpan ADC with Wide Input Common Mode Range. More...

## Detailed Description

Library for LTC23XX: 16/18-Bit Differential Input SoftSpan ADC with Wide Input Common Mode Range.

Definition in file LTC2348.cpp.

Go to the source code of this file.

## Functions
void | LTC23XX_create_config_word (uint8_t channel, uint8_t config_number, uint32_t *config_word)
| Creates 24-bit configuration word for the 8 channels. More...
void | LTC23XX_read (uint8_t cs_pin, uint32_t config_word, uint8_t data_array[24])
| Transmits 24 bits (3 bytes) of configuration information and reads back 24 bytes of data (3 bytes/ 24 bits for each channel) 24 bits: 18 bit data + 3 bit config + 3 bit channel number. More...
int32_t | sign_extend_17 (uint32_t data)
float | LTC23XX_voltage_calculator (uint32_t data, uint8_t channel_configuration)
| Calculates the voltage from ADC output data depending on the channel configuration. More...

## Function Documentation

## ◆ LTC23XX_create_config_word()

void LTC23XX_create_config_word | ( | uint8_t | channel,
|  | uint8_t | config_number,
|  | uint32_t * | config_word
| ) |  |

Creates 24-bit configuration word for the 8 channels.

Parameters

  channel | Channel number
  config_number | Configuration number for the channel
  config_word | 24 bit config word created

Definition at line 106 of file LTC2348.cpp.

## ◆ LTC23XX_read()

void LTC23XX_read | ( | uint8_t | cs_pin,
|  | uint32_t | config_word,
|  | uint8_t | data_array[24]
| ) |  |

Transmits 24 bits (3 bytes) of configuration information and reads back 24 bytes of data (3 bytes/ 24 bits for each channel) 24 bits: 18 bit data + 3 bit config + 3 bit channel number.

Parameters

  cs_pin | Chip select
  config_word | 3 bytes of configutaion data for 8 channels
  data_array | Data array to read in 24 bytes of data from 8 channels

Definition at line 115 of file LTC2348.cpp.

## ◆ LTC23XX_voltage_calculator()

float LTC23XX_voltage_calculator | ( | uint32_t | data,
|  | uint8_t | channel_configuration
| ) |  |

Calculates the voltage from ADC output data depending on the channel configuration.

Parameters

  data | 24 bits of ADC output data for a single channel
  channel_configuration | 3 bits of channel configuration data

Definition at line 142 of file LTC2348.cpp.

## ◆ sign_extend_17()

int32_t sign_extend_17 | ( | uint32_t | data | ) |

Definition at line 130 of file LTC2348.cpp.