Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

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
data16-bit digital data input
RANGE_HIGHMaximum voltage range
RANGE_LOWMinimum 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
voltageVoltage to be converted
RANGE_HIGHMaximum voltage range
RANGE_LOWMinimum 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
csChip Select
dac_command4-bit command: c3 c2 c1 c0 X X X X
data16-bit digital data input

Definition at line 80 of file LTC1592.cpp.