| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions
LTC1592.cpp File Reference
Digital-to-Analog Converters (DAC) » LTC1592: 16-bit SoftSpan DAC with Programmable Output Range

Library for LTC1592: 16-bit SoftSpan DAC with Programmable Output Range. More...

## Detailed Description

Library for LTC1592: 16-bit SoftSpan DAC with Programmable Output Range.

Definition in file LTC1592.cpp.

Go to the source code of this file.

## Functions
void | LTC1592_write (uint8_t cs, uint8_t dac_command, uint16_t data)
| Transmits 24 bit input stream: 4-bit command + 4-bit don't-care + 16-bit data. More...
float | LTC1592_code_to_voltage (uint16_t data, float RANGE_HIGH, float RANGE_LOW)
| Calculates the voltage from ADC output data depending on the channel configuration. More...
uint16_t | LTC1592_voltage_to_code (float voltage, float RANGE_HIGH, float RANGE_LOW)
| Calculates the 16 bit data code from voltage. More...

## Function Documentation

## ◆ LTC1592_code_to_voltage()

float LTC1592_code_to_voltage | ( | uint16_t | data,
|  | float | RANGE_HIGH,
|  | float | RANGE_LOW
| ) |  |

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

Returns
  Floating point voltage

Parameters

  data | 16-bit digital data input
  RANGE_HIGH | Maximum voltage range
  RANGE_LOW | Minimum voltage range

Definition at line 92 of file LTC1592.cpp.

## ◆ LTC1592_voltage_to_code()

uint16_t LTC1592_voltage_to_code | ( | float | voltage,
|  | float | RANGE_HIGH,
|  | float | RANGE_LOW
| ) |  |

Calculates the 16 bit data code from voltage.

Returns
  16 bit data code

Parameters

  voltage | Voltage to be converted
  RANGE_HIGH | Maximum voltage range
  RANGE_LOW | Minimum voltage range

Definition at line 100 of file LTC1592.cpp.

## ◆ LTC1592_write()

void LTC1592_write | ( | uint8_t | cs,
|  | uint8_t | dac_command,
|  | uint16_t | data
| ) |  |

Transmits 24 bit input stream: 4-bit command + 4-bit don't-care + 16-bit data.

Returns
  void

Parameters

  cs | Chip Select
  dac_command | 4-bit command: c3 c2 c1 c0 X X X X
  data | 16-bit digital data input

Definition at line 80 of file LTC1592.cpp.