Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

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

Detailed Description

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

Definition in file LTC2664.cpp.

Go to the source code of this file.

Functions

int8_t LTC2664_write (uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
 Write the 16-bit dac_code to the LTC2664. More...
 
uint16_t LTC2664_voltage_to_code (float dac_voltage, float min_output, float max_output)
 Calculate a LTC2664 DAC code given the desired output voltage and DAC address (0-3) More...
 
float LTC2664_code_to_voltage (uint16_t dac_code, float min_output, float max_output)
 Calculate the LTC2664 DAC output voltage given the DAC code, offset, and LSB. More...
 

Function Documentation

◆ LTC2664_code_to_voltage()

float LTC2664_code_to_voltage ( uint16_t  dac_code,
float  min_output,
float  max_output 
)

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

Returns
the output voltage

Definition at line 123 of file LTC2664.cpp.

◆ LTC2664_voltage_to_code()

uint16_t LTC2664_voltage_to_code ( float  dac_voltage,
float  min_output,
float  max_output 
)

Calculate a LTC2664 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 109 of file LTC2664.cpp.

◆ LTC2664_write()

int8_t LTC2664_write ( uint8_t  cs,
uint8_t  dac_command,
uint8_t  dac_address,
uint16_t  dac_code 
)

Write the 16-bit dac_code to the LTC2664.

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

Definition at line 70 of file LTC2664.cpp.