| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions
LTC2666.cpp File Reference
Digital-to-Analog Converters (DAC) » LTC2666 8-Channel SPI 16-/12-Bit +/-10V Vout SoftSpan DACs with 10ppm/C Max Reference

Library for LTC2666 8-Channel SPI 16-/12-Bit +/-10V Vout SoftSpan DACs with 10ppm/C Max Reference. More...

## Detailed Description

Library for LTC2666 8-Channel SPI 16-/12-Bit +/-10V Vout SoftSpan DACs with 10ppm/C Max Reference.

Definition in file LTC2666.cpp.

Go to the source code of this file.

## Functions
int8_t | LTC2666_write (uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
| Write the 16-bit dac_code to the LTC2666. More...
uint16_t | LTC2666_voltage_to_code (float dac_voltage, float min_output, float max_output)
| Calculate a LTC2666 DAC code given the desired output voltage and DAC address (0-3) More...
float | LTC2666_code_to_voltage (uint16_t dac_code, float min_output, float max_output)
| Calculate the LTC2666 DAC output voltage given the DAC code, offset, and LSB. More...

## Function Documentation

## ◆ LTC2666_code_to_voltage()

float LTC2666_code_to_voltage | ( | uint16_t | dac_code,
|  | float | min_output,
|  | float | max_output
| ) |  |

Calculate the LTC2666 DAC output voltage given the DAC code, offset, and LSB.

Returns
  the output voltage

Definition at line 117 of file LTC2666.cpp.

## ◆ LTC2666_voltage_to_code()

uint16_t LTC2666_voltage_to_code | ( | float | dac_voltage,
|  | float | min_output,
|  | float | max_output
| ) |  |

Calculate a LTC2666 DAC code given the desired output voltage and DAC address (0-3)

Returns
  The 16 bit code to send to the DAC

Definition at line 103 of file LTC2666.cpp.

## ◆ LTC2666_write()

int8_t LTC2666_write | ( | uint8_t | cs,
|  | uint8_t | dac_command,
|  | uint8_t | dac_address,
|  | uint16_t | dac_code
| ) |  |

Write the 16-bit dac_code to the LTC2666.

Returns
  Zero if readback (SDO) data matches the value previously sent, One if mismatched (indicating data error somewhere)

Definition at line 70 of file LTC2666.cpp.