![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Library for LTC2642 16-/14-/12-Bit VOUT DAC with SPI Interface. More...
Library for LTC2642 16-/14-/12-Bit VOUT DAC with SPI Interface.
Definition in file LTC2642.cpp.
Go to the source code of this file.
Functions | |
| void | LTC2642_write (uint8_t cs, uint16_t data) |
| Writes the 16-bit data into the DAC. More... | |
| uint16_t | LTC2642_voltage_to_code (float voltage, float reference_voltage, uint8_t range) |
| Calculates the 16 bit data code from voltage. More... | |
| float | LTC2642_code_to_voltage (uint16_t code, float reference_voltage, uint8_t range) |
| Calculates the output voltage from the given digital code and reference voltage. More... | |
| float LTC2642_code_to_voltage | ( | uint16_t | data, |
| float | reference_voltage, | ||
| uint8_t | range | ||
| ) |
Calculates the output voltage from the given digital code and reference voltage.
| code | 16-bit digital input data |
| reference_voltage | Reference voltage |
| range | Unipolar/Bipolar |
Definition at line 107 of file LTC2642.cpp.
| uint16_t LTC2642_voltage_to_code | ( | float | voltage, |
| float | reference_voltage, | ||
| uint8_t | range | ||
| ) |
Calculates the 16 bit data code from voltage.
| voltage | Analog voltage to be converted into code |
| reference_voltage | Reference Voltage |
| range | Unipolar/Bipolar |
Definition at line 92 of file LTC2642.cpp.
| void LTC2642_write | ( | uint8_t | cs, |
| uint16_t | data | ||
| ) |
Writes the 16-bit data into the DAC.
| cs | Chip Select Pin |
| data | 16-bit digital input data |
Definition at line 85 of file LTC2642.cpp.