![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Library for LTC2604: Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP. More...
Library for LTC2604: Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP.
Definition in file LTC2604.cpp.
Go to the source code of this file.
Functions | |
void | LTC2604_write (uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code) |
Write the 16-bit dac_code to the LTC2604. More... | |
uint16_t | LTC2604_voltage_to_code (float dac_voltage, float LTC2604_lsb, int16_t LTC2604_offset) |
Calculate a LTC2604 DAC code given the desired output voltage and DAC address (0-3) More... | |
float | LTC2604_code_to_voltage (uint16_t dac_code, float LTC2604_lsb, int16_t LTC2604_offset) |
Calculate the LTC2604 DAC output voltage given the DAC code, offset, and LSB value. More... | |
float LTC2604_code_to_voltage | ( | uint16_t | dac_code, |
float | LTC2604_lsb, | ||
int16_t | LTC2604_offset | ||
) |
Calculate the LTC2604 DAC output voltage given the DAC code, offset, and LSB value.
dac_code | DAC code |
LTC2604_lsb | LSB value (volts) |
LTC2604_offset | Offset (volts) |
Definition at line 103 of file LTC2604.cpp.
uint16_t LTC2604_voltage_to_code | ( | float | dac_voltage, |
float | LTC2604_lsb, | ||
int16_t | LTC2604_offset | ||
) |
Calculate a LTC2604 DAC code given the desired output voltage and DAC address (0-3)
dac_voltage | Voltage to send to DAC |
LTC2604_lsb | LSB value (volts) |
LTC2604_offset | Offset (volts) |
Definition at line 90 of file LTC2604.cpp.
void LTC2604_write | ( | uint8_t | cs, |
uint8_t | dac_command, | ||
uint8_t | dac_address, | ||
uint16_t | dac_code | ||
) |
Write the 16-bit dac_code to the LTC2604.
cs | Chip Select Pin |
dac_command | Command Nibble, left-justified, lower nibble set to zero |
dac_address | DAC Address Nibble, right justified, upper nibble set to zero |
dac_code | 16-bit DAC code |
Definition at line 75 of file LTC2604.cpp.