![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
LTC2668: 16-Channel SPI 16-/12-Bit +/-10V Vout SoftSpan DACs with 10ppm/C Max Reference. More...
LTC2668: 16-Channel SPI 16-/12-Bit +/-10V Vout SoftSpan DACs with 10ppm/C Max Reference.
The LTC2668 is a family of 16-channel, 12/16-bit +/-10V digital-to-analog converters with integrated precision references. They are guaranteed monotonic and have built-in rail-to-rail output buffers. These SoftSpan DACs offer five output ranges up to +/-10V. The range of each channel is independently programmable, or the part can be hardware-configured for operation in a fixed range. The integrated 2.5V reference is buffered separately to each channel; an external reference can be used for additional range options. The LTC2668 also includes toggle capability - alternating codes via the software toggle command, or by providing a free-running clock to the TGP pin. The SPI/Microwire-compatible 3-wire serial interface operates on logic levels as low as 1.71V, at clock rates up to 50MHz. SPI DATA FORMAT (MSB First): 24-Bit Load Sequence: Byte #1 Byte #2 Byte #3 Command MSB LSB LTC2668-16 : C3 C2 C1 C0 A3 A2 A1 A0 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 LTC2668-12 : C3 C2 C1 C0 A3 A2 A1 A0 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 X X X X 32-Bit Load Sequence: Byte #1 Byte #2 Byte #3 Byte #4 Command MSB LSB LTC2668-16 : X X X X X X X X C3 C2 C1 C0 A3 A2 A1 A0 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 LTC2668-12 : X X X X X X X X C3 C2 C1 C0 A3 A2 A1 A0 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 X X X X Cx : DAC Command Code Ax : DAC Address (0 to F, corresponding to DAC 0 to DAC 15) Dx : DAC Data Bits X : Don't care
http://www.linear.com/product/LTC2668
http://www.linear.com/product/LTC2668#demoboards
Copyright 2018(c) Analog Devices, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Header for LTC2668: 16-Channel SPI 16-/12-Bit +/-10V Vout SoftSpan DACs with 10ppm/C Max Reference
Definition in file LTC2668.h.
Go to the source code of this file.
Functions | |
int8_t | LTC2668_write (uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code) |
Write the 16-bit dac_code to the LTC2668. More... | |
uint16_t | LTC2668_voltage_to_code (float dac_voltage, float min_output, float max_output) |
Calculate a LTC2668 DAC code given the desired output voltage and DAC address (0-3) More... | |
float | LTC2668_code_to_voltage (uint16_t dac_code, float min_output, float max_output) |
Calculate the LTC2668 DAC output voltage given the DAC code, offset, and LSB. More... | |
Macros | |
#define | LTC2668_CS QUIKEVAL_CS |
Define the SPI CS pin. More... | |
LTC2668 Command Codes | |
OR'd together with the DAC address to form the command byte | |
#define | LTC2668_CMD_WRITE_N 0x00 |
Write to input register n. More... | |
#define | LTC2668_CMD_UPDATE_N 0x10 |
Update (power up) DAC register n. More... | |
#define | LTC2668_CMD_WRITE_N_UPDATE_ALL 0x20 |
Write to input register n, update (power-up) all. More... | |
#define | LTC2668_CMD_WRITE_N_UPDATE_N 0x30 |
Write to input register n, update (power-up) More... | |
#define | LTC2668_CMD_POWER_DOWN_N 0x40 |
Power down n. More... | |
#define | LTC2668_CMD_POWER_DOWN_ALL 0x50 |
Power down chip (all DAC's, MUX and reference) More... | |
#define | LTC2668_CMD_SPAN 0x60 |
Write span to dac n. More... | |
#define | LTC2668_CMD_CONFIG 0x70 |
Configure reference / toggle. More... | |
#define | LTC2668_CMD_WRITE_ALL 0x80 |
Write to all input registers. More... | |
#define | LTC2668_CMD_UPDATE_ALL 0x90 |
Update all DACs. More... | |
#define | LTC2668_CMD_WRITE_ALL_UPDATE_ALL 0xA0 |
Write to all input reg, update all DACs. More... | |
#define | LTC2668_CMD_MUX 0xB0 |
Select MUX channel (controlled by 5 LSbs in data word) More... | |
#define | LTC2668_CMD_TOGGLE_SEL 0xC0 |
Select which DACs can be toggled (via toggle pin or global toggle bit) More... | |
#define | LTC2668_CMD_GLOBAL_TOGGLE 0xD0 |
Software toggle control via global toggle bit. More... | |
#define | LTC2668_CMD_SPAN_ALL 0xE0 |
Set span for all DACs. More... | |
#define | LTC2668_CMD_NO_OPERATION 0xF0 |
No operation. More... | |
LTC2668 Span Codes | |
Descriptions are valid for a 2.5V reference. These can also be interpreted as 0 to 2*Vref, 0 to 4*Vref, etc. when an external reference other than 2.5V is used. | |
#define | LTC2668_SPAN_0_TO_5V 0x0000 |
#define | LTC2668_SPAN_0_TO_10V 0x0001 |
#define | LTC2668_SPAN_PLUS_MINUS_5V 0x0002 |
#define | LTC2668_SPAN_PLUS_MINUS_10V 0x0003 |
#define | LTC2668_SPAN_PLUS_MINUS_2V5 0x0004 |
LTC2668 Configuration options | |
Used in conjunction with LTC2668_CMD_CONFIG command | |
#define | LTC2668_REF_DISABLE 0x0001 |
#define | LTC2668_THERMAL_SHUTDOWN 0x0002 |
LTC2668 MUX enable | |
Used in conjunction with LTC2668_CMD_MUX command | |
#define | LTC2668_MUX_DISABLE 0x0000 |
#define | LTC2668_MUX_ENABLE 0x0010 |
LTC2668 Global Toggle | |
Used in conjunction with LTC2668_CMD_GLOBAL_TOGGLE command, affects DACs whose Toggle Select bits have been set to 1 | |
#define | LTC2668_TOGGLE_REG_A 0x0000 |
#define | LTC2668_TOGGLE_REG_B 0x0010 |
Variables | |
LTC2668 Minimums and Maximums for each Span | |
Lookup tables for minimum and maximum outputs for a given span | |
const float | LTC2668_MIN_OUTPUT [5] = {0.0, 0.0, -5.0, -10.0, -2.5} |
const float | LTC2668_MAX_OUTPUT [5] = {5.0, 10.0, 5.0, 10.0, 2.5} |
float LTC2668_code_to_voltage | ( | uint16_t | dac_code, |
float | min_output, | ||
float | max_output | ||
) |
Calculate the LTC2668 DAC output voltage given the DAC code, offset, and LSB.
Definition at line 117 of file LTC2668.cpp.
uint16_t LTC2668_voltage_to_code | ( | float | dac_voltage, |
float | min_output, | ||
float | max_output | ||
) |
Calculate a LTC2668 DAC code given the desired output voltage and DAC address (0-3)
Definition at line 103 of file LTC2668.cpp.
int8_t LTC2668_write | ( | uint8_t | cs, |
uint8_t | dac_command, | ||
uint8_t | dac_address, | ||
uint16_t | dac_code | ||
) |
Write the 16-bit dac_code to the LTC2668.
Definition at line 70 of file LTC2668.cpp.
#define LTC2668_CMD_CONFIG 0x70 |
#define LTC2668_CMD_GLOBAL_TOGGLE 0xD0 |
#define LTC2668_CMD_MUX 0xB0 |
#define LTC2668_CMD_POWER_DOWN_ALL 0x50 |
#define LTC2668_CMD_TOGGLE_SEL 0xC0 |
#define LTC2668_CMD_UPDATE_N 0x10 |
#define LTC2668_CMD_WRITE_ALL 0x80 |
#define LTC2668_CMD_WRITE_ALL_UPDATE_ALL 0xA0 |
#define LTC2668_CMD_WRITE_N 0x00 |
#define LTC2668_CMD_WRITE_N_UPDATE_ALL 0x20 |
#define LTC2668_CMD_WRITE_N_UPDATE_N 0x30 |
#define LTC2668_CS QUIKEVAL_CS |
const float LTC2668_MAX_OUTPUT[5] = {5.0, 10.0, 5.0, 10.0, 2.5} |