LTC2604 - Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
Features
- Smallest Pin Compatible Quad 16-Bit DAC:
LTC2604: 16-Bits
LTC2614: 14-Bits
LTC2624: 12-Bits - Guaranteed 16-Bit Monotonic Over Temperature
- Separate Reference Inputs for each DAC
- Wide 2.5V to 5.5V Supply Range
- Low Power Operation: 250µA per DAC at 3V
- Individual DAC Power-Down to 1µA, Max
- Ultralow Crosstalk Between DACs (<5µV)
- High Rail-to-Rail Output Drive (±15mA)
- Double Buffered Digital Inputs
- LTC2604-1/LTC2614-1/LTC2624-1: Power-On Reset to Midscale
- 16-Lead Narrow SSOP Package
Typical Application
Description
The LTC2604/LTC2614/LTC2624 are quad 16-,14- and 12-bit 2.5V to 5.5V rail-to-rail voltage output DACs in 16-lead narrow SSOP packages. These parts have separate reference inputs for each DAC. They have built-in high performance output buffers and are guaranteed monotonic.
These parts establish advanced performance standards for output drive, crosstalk and load regulation in single supply, voltage output multiples.
The parts use a simple SPI/MICROWIRE™ compatible 3-wire serial interface which can be operated at clock rates up to 50MHz. Daisy-chain capability and a hardware CLR function are included.
The LTC2604/LTC2614/LTC2624 incorporate a poweron reset circuit. During power-up, the voltage outputs rise less than 10mV above zero scale; and after power-up, they stay at zero scale until a valid write and update take place. The power-on reset circuit resets the LTC2604-1/ LTC2614-1/LTC2624-1 to midscale. The voltage outputs stay at midscale until a valid write and update take place.
Packaging
CAD Symbols and Footprints: The downloadable Zip file below contains the schematic symbol and PCB footprints.
For complete and up to date package information and drawings, please refer to our packaging page
| Part Number | Package | Code | Temp | Package Drawing |
RoHS |
|---|---|---|---|---|---|
| LTC2604CGN-1#PBF | SSOP-16 | GN | C | 05-08-1641 (GN16) | Yes |
| LTC2604CGN-1#TRPBF | SSOP-16 | GN | C | 05-08-1641 (GN16) | Yes |
| LTC2604CGN#PBF | SSOP-16 | GN | C | 05-08-1641 (GN16) | Yes |
| LTC2604CGN#TRPBF | SSOP-16 | GN | C | 05-08-1641 (GN16) | Yes |
| LTC2604IGN-1#PBF | SSOP-16 | GN | I | 05-08-1641 (GN16) | Yes |
| LTC2604IGN-1#TRPBF | SSOP-16 | GN | I | 05-08-1641 (GN16) | Yes |
| LTC2604IGN#PBF | SSOP-16 | GN | I | 05-08-1641 (GN16) | Yes |
| LTC2604IGN#TRPBF | SSOP-16 | GN | I | 05-08-1641 (GN16) | Yes |
Order Info
- Part numbers ending in PBF are lead free. Solder plated terminal finish (SnPb) versions are non-standard and special terms and conditions and pricing applies if available. Please contact LTC marketing for information.
- Part numbers containing TR or TRM are shipped in tape and reel or 500 unit mini tape and reel, respectively
- Please refer to our general ordering information or the product datasheet for more details
Package Variations and Pricing
| Part Number | Package | Temp | Price (1-99) |
Price (1k)* |
RoHS | |
|---|---|---|---|---|---|---|
| LTC2604CGN-1#PBF | SSOP-16 | C | $11.70 | $9.50 | Yes | |
| LTC2604CGN-1#TRPBF | SSOP-16 | C | $9.56 | Yes | ||
| LTC2604CGN#PBF | SSOP-16 | C | $11.70 | $9.50 | Yes | |
| LTC2604CGN#TRPBF | SSOP-16 | C | $9.56 | Yes | ||
| LTC2604IGN-1#PBF | SSOP-16 | I | $13.45 | $10.95 | Yes | |
| LTC2604IGN-1#TRPBF | SSOP-16 | I | $11.01 | Yes | ||
| LTC2604IGN#PBF | SSOP-16 | I | $13.45 | $10.95 | Yes | |
| LTC2604IGN#TRPBF | SSOP-16 | I | $11.01 | Yes | ||
| Buy Now • Request Samples | ||||||
Demo Boards
Linear Technology offers many demo boards free of charge to qualified customers. Contact your local sales office or distributor to inquire about a demo board. Certain demo boards are also available for sale via credit card on this website. Demo boards are for evaluation purposes only. It remains the customer’s responsibility to verify proper and reliable operation in the actual end application.| Part Number | Description | Price | Documentation |
|---|---|---|---|
| DC809A | LTC2604CGN | Quad 16-Bit SPI Rail-to-Rail DAC with Independent References (req DC590) | $50.00 | |
| Buy Now | |||
Companion Boards
| Part Number | Description | Price | Documentation |
|---|---|---|---|
| DC590B | Isolated USB Serial Controller for Linear Technology QuikEval-Compatible Demo Boards | $50.00 | |
| Buy Now | |||
Applications
- Mobile Communications
- Process Control and Industrial Automation
- Instrumentation
- Automatic Test Equipment
People Who Viewed This Product Also Viewed
- LTC6655 - 0.25ppm Noise, Low Drift Precision References
- LT5400 - Quad Matched Resistor Network
- LT3080 - Adjustable 1.1A Single Resistor Low Dropout Regulator
- LTC2654 - Quad 16-/12-Bit Rail-to-Rail DACs with 10ppm/°C Max Reference
- LTC2602 - Dual 16-Bit Rail-to-Rail DACs in 8-Lead MSOP
- LTC2440 - 24-Bit High Speed Differential Delta Sigma ADC with Selectable Speed/Resolution
- LT6654 - Precision Wide Supply High Output Drive Low Noise Reference
- LT1028 - Ultra Low Noise Precision High Speed Op Amps
- LT1763 - 500mA, Low Noise, LDO Micropower Regulators
- LTM2883 - SPI/Digital or I2C μModule Isolator with Adjustable ±12.5V and 5V Regulated Power
Product Notifications
Please login to your MyLinear account for notifications of datasheet updates, new document releases and LTspice model announcements for your favorite products. If you do not have a MyLinear account you may Sign Up Now.
Forgot your password? Click here.
Need help? Email mylinear@linear.com with questions and comments.
Design Tools
Linduino
Linduino is an Arduino compatible platform for developing and distributing firmware libraries and code for SPI and I²C-compatible integrated circuits. The Linduino One board interfaces to more than 300 QuikEval demonstration cards, supporting a variety of product types including analog-to-digital converters (ADCs), digital-to-analog converters (DACs), power monitors, and more. Firmware libraries for individual devices are written in C and designed to be portable to a wide variety of processors and microcontrollers. Each library has a demonstration program that can be uploaded to the Linduino One platform to allow the circuit and software to be quickly and easily verified.
Code
Linduino is Linear Technology's Arduino compatible system for developing and distributing firmware libraries and example code for Linear Technology’s integrated circuits. The code below can be downloaded or copied and pasted into your project. Please visit the Linduino Home Page for demo board, manual and setup information.
This part is Code Supported: There is example code available for this part. The code below may rely on other drivers available in the full library.
Download LTC2604 - DC809A Linduino .INO File
/*!
LTC2604: Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
@verbatim
The LTC2604/LTC2614/LTC2624 are quad 16-,14- and 12-bit 2.5V to 5.5V
rail-to-rail voltage output DACs in 16-lead narrow SSOP packages. These
parts have separate reference inputs for each DAC. They have built-in
high performance output buffers and are guaranteed monotonic.
These parts establish advanced performance standards for output drive,
crosstalk and load regulation in single-supply, voltage output multiples.
@endverbatim
http://www.linear.com/product/LTC2604
http://www.linear.com/product/LTC2604#demoboards
REVISION HISTORY
$Revision: 5670 $
$Date: 2016-09-02 10:55:41 -0700 (Fri, 02 Sep 2016) $
Copyright (c) 2014, Linear Technology Corp.(LTC)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, 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.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of Linear Technology Corp.
The Linear Technology Linduino is not affiliated with the official Arduino team.
However, the Linduino is only possible because of the Arduino team's commitment
to the open-source community. Please, visit http://www.arduino.cc and
http://store.arduino.cc , and consider a purchase that will help fund their
ongoing work.
*/
/*! @file
@ingroup LTC2604
*/
#include <Arduino.h>
#include <stdint.h>
#include "Linduino.h"
#include "LT_SPI.h"
#include "UserInterface.h"
#include "LT_I2C.h"
#include "QuikEval_EEPROM.h"
#include "LTC2604.h"
#include <SPI.h>
#include <Wire.h>
//Function Declaration
void print_title(); // Print the title block
void print_prompt(int16_t selected_dac); // Prompt the user for an input command
int16_t prompt_voltage_or_code();
uint16_t get_voltage(float LTC2604_lsb, int16_t LTC2604_offset);
uint16_t get_code();
void menu_1_select_dac(int16_t *selected_dac);
void menu_2_write_to_input_register(int16_t selected_dac);
void menu_3_write_and_update_dac(int16_t selected_dac);
void menu_4_update_power_up_dac(int16_t selected_dac);
void menu_5_power_down_dac(int16_t selected_dac);
//Global variables
static uint8_t demo_board_connected; //!< set to 1 if the board is connected
static uint8_t shift_count =0; //!< The data align shift count for 16-bit =0 14-bit =2 12-bit =4
static float reference_voltage[4] = {4.096,4.096,4.096,4.096}; //!< set based on jumper positions
static int16_t LTC2604_offset =0;
static float LTC2604_lsb[4] = {reference_voltage[0]/ (pow(2,16) - 1) , reference_voltage[1]/ (pow(2,16) - 1),
reference_voltage[2]/ (pow(2,16) - 1),reference_voltage[3]/ (pow(2,16) - 1)
};
// constants
//! Lookup table for DAC address. Allows the "All DACs" address to be indexed right after DAC D in loops.
//! This technique is very useful for devices with non-monotonic channel addresses.
const uint8_t address_map[5] = {LTC2604_DAC_A, LTC2604_DAC_B, LTC2604_DAC_C, LTC2604_DAC_D, LTC2604_DAC_ALL}; //!< Map entered option 0..2 to DAC address
//! Used to keep track to print voltage or print code
enum
{
PROMPT_VOLTAGE = 0, /**< 0 */
PROMPT_CODE = 1 /**< 1 */
};
//! Initialize Linduino
void setup()
// Setup the program
{
char demo_name[] = "DC809A"; // Demo Board Name stored in QuikEval EEPROM
quikeval_SPI_init(); // Configure the spi port for 4MHz SCK
quikeval_SPI_connect(); // Connect SPI to main data port
Serial.begin(115200); // Initialize the serial port to the PC
print_title();
demo_board_connected = true; //discover_demo_board(demo_name);
if (demo_board_connected)
{
print_prompt(0);
}
}
//! Repeats Linduino loops
void loop()
{
int16_t user_command;
static int16_t selected_dac =0; // The selected DAC to be updated (0=A, 1=B ... 5=All). Initialized to "A".
// The main control loop
if (demo_board_connected) // Do nothing if the demo board is not connected
{
if (Serial.available()) // Check for user input
{
user_command = read_int(); // Read the user command
Serial.println(user_command);
Serial.flush();
switch (user_command)
{
case 1:
menu_1_select_dac(&selected_dac);
break;
case 2:
menu_2_write_to_input_register(selected_dac);
break;
case 3:
menu_3_write_and_update_dac(selected_dac);
break;
case 4:
menu_4_update_power_up_dac(selected_dac);
break;
case 5:
menu_5_power_down_dac(selected_dac);
break;
}
Serial.println("\n*****************************************************************");
print_prompt(selected_dac);
}
}
}
// Function Definitions
//! Select which DAC to operate on
void menu_1_select_dac(int16_t *selected_dac ) //!< what DAC to operate on
{
// Select a DAC to operate on
Serial.print("Select DAC to operate on (0=A, 1=B, 2=C, 3=D, 4=All)");
*selected_dac = read_int();
if (*selected_dac == 4)
Serial.println("All");
else
Serial.println(*selected_dac);
}
//! Write data to input register, but do not update DAC output
void menu_2_write_to_input_register(int16_t selected_dac) //!< what DAC to operate on
{
uint16_t dac_code;
if (prompt_voltage_or_code() == PROMPT_VOLTAGE)
dac_code = get_voltage(LTC2604_lsb[selected_dac], LTC2604_offset);
else
dac_code = get_code();
LTC2604_write(LTC2604_CS, LTC2604_CMD_WRITE, address_map[selected_dac], dac_code << shift_count);
}
//!Write data to DAC register (which updates output immediately)
void menu_3_write_and_update_dac(int16_t selected_dac) //!< what DAC to operate on
{
uint16_t dac_code;
if (prompt_voltage_or_code() == PROMPT_VOLTAGE)
dac_code = get_voltage(LTC2604_lsb[selected_dac], LTC2604_offset);
else
dac_code = get_code();
LTC2604_write(LTC2604_CS,LTC2604_CMD_WRITE_UPDATE, address_map[selected_dac], dac_code << shift_count);
}
//! Update DAC with data that is stored in input register, power up if sleeping
void menu_4_update_power_up_dac(int16_t selected_dac) //!< what DAC to operate on
{
// Update DAC
LTC2604_write(LTC2604_CS,LTC2604_CMD_UPDATE, address_map[selected_dac], 0x0000);
}
//! Power down DAC
void menu_5_power_down_dac(int16_t selected_dac) //!< what DAC to operate on
{
// Power down DAC
LTC2604_write(LTC2604_CS,LTC2604_CMD_POWER_DOWN, address_map[selected_dac], 0x0000);
}
//! Prompt user to enter a voltage or digital code to send to DAC
//! @returns user input
int16_t prompt_voltage_or_code()
{
int16_t user_input;
Serial.print(F("Type 1 to enter voltage, 2 to enter code:"));
Serial.flush();
user_input = read_int();
Serial.println(user_input);
if (user_input != 2)
return(PROMPT_VOLTAGE);
else
return(PROMPT_CODE);
}
//! Get voltage from user input, calculate DAC code based on lsb, offset
//! @returns the DAC code
uint16_t get_voltage(float LTC2604_lsb, //!< the voltage LSB of the DAC
int16_t LTC2604_offset) //!< the Offset of the DAC
{
float dac_voltage;
Serial.print(F("Enter Desired DAC output voltage: "));
dac_voltage = read_float();
Serial.print(dac_voltage);
Serial.println(" V");
Serial.flush();
return(LTC2604_voltage_to_code(dac_voltage, LTC2604_lsb, LTC2604_offset));
}
//! Get code to send to DAC directly, in decimal, hex, or binary
//! @return code from user
uint16_t get_code()
{
uint16_t returncode;
Serial.println("Enter Desired DAC Code");
Serial.print("(Format 32768, 0x8000, 0100000, or B1000000000000000): ");
returncode = (uint16_t) read_int();
Serial.print("0x");
Serial.println(returncode, HEX);
Serial.flush();
return(returncode);
}
//! Prints the title block when program first starts.
void print_title()
{
Serial.println("");
Serial.println(F("*****************************************************************"));
Serial.println(F("* DC809A Demonstration Program *"));
Serial.println(F("* *"));
Serial.println(F("* This program demonstrates how to send data to the LTC2604 *"));
Serial.println(F("* quad 16/14/12-bit DAC found on the DC809A demo board. *"));
Serial.println(F("* *"));
Serial.println(F("* Set the baud rate to 115200 and select the newline terminator.*"));
Serial.println(F("* *"));
Serial.println(F("*****************************************************************"));
}
//! Prints main menu.
void print_prompt(int16_t selected_dac) //!< what DAC to operate on
{
Serial.println(F("\nCommand Summary:"));
Serial.println(F(" 1-Select DAC"));
Serial.println(F(" 2-Write to input register (no update)"));
Serial.println(F(" 3-Write and update DAC"));
Serial.println(F(" 4-Update / power up DAC"));
Serial.println(F(" 5-Power down DAC"));
Serial.println("\nPresent Values:");
Serial.print(" Selected DAC: ");
if (selected_dac != 4)
Serial.println((char) (selected_dac + 0x41));
else
Serial.println("All");
Serial.print(" DAC Reference: ");
Serial.println("Internal");
Serial.print(F("Enter a command:"));
Serial.flush();
}Download LTC2604 - Linduino CPP File
/*!
LTC2604: Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
@verbatim
The LTC2604/LTC2614/LTC2624 are quad 16-,14- and 12-bit 2.5V to 5.5V
rail-to-rail voltage output DACs in 16-lead narrow SSOP packages. These
parts have separate reference inputs for each DAC. They have built-in
high performance output buffers and are guaranteed monotonic.
These parts establish advanced performance standards for output drive,
crosstalk and load regulation in single-supply, voltage output multiples.
@endverbatim
http://www.linear.com/product/LTC2604
http://www.linear.com/product/LTC2604#demoboards
REVISION HISTORY
$Revision: 5670 $
$Date: 2016-09-02 10:55:41 -0700 (Fri, 02 Sep 2016) $
Copyright (c) 2014, Linear Technology Corp.(LTC)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, 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.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of Linear Technology Corp.
The Linear Technology Linduino is not affiliated with the official Arduino team.
However, the Linduino is only possible because of the Arduino team's commitment
to the open-source community. Please, visit http://www.arduino.cc and
http://store.arduino.cc , and consider a purchase that will help fund their
ongoing work.
*/
//! @defgroup LTC2604 LTC2604: Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
/*! @file
@ingroup LTC2604
Library for LTC2604: Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
*/
#include <stdint.h>
#include <math.h>
#include <Arduino.h>
#include "Linduino.h"
#include "LT_SPI.h"
#include "LTC2604.h"
#include <SPI.h>
// Write the 16-bit dac_code to the LTC2604
void LTC2604_write(uint8_t cs, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
{
uint8_t data_array[3], rx_array[3];
LT_union_int16_2bytes data;
data.LT_uint16 = dac_code;
data_array[2] = dac_command | dac_address;
data_array[1] = data.LT_byte[1];
data_array[0] =data.LT_byte[0];
spi_transfer_block(cs, data_array, rx_array, (uint8_t) 3);
}
// Calculate a LTC2604 DAC code given the desired output voltage and DAC address (0-3)
uint16_t LTC2604_voltage_to_code(float dac_voltage, float LTC2604_lsb, int16_t LTC2604_offset)
{
int32_t dac_code;
float float_code;
float_code = dac_voltage / LTC2604_lsb; //! 1) Calculate the DAC code
float_code = (float_code > (floor(float_code) + 0.5)) ? ceil(float_code) : floor(float_code); //! 2) Round
dac_code = (int32_t)float_code - LTC2604_offset; //! 3) Subtract offset
if (dac_code < 0) //! 4) If DAC code < 0, Then DAC code = 0
dac_code = 0;
return ((uint16_t)dac_code); //! 5) Cast DAC code as uint16_t
}
// Calculate the LTC2604 DAC output voltage given the DAC code and DAC address (0-3)
float LTC2604_code_to_voltage(uint16_t dac_code, float LTC2604_lsb, int16_t LTC2604_offset)
{
float dac_voltage;
dac_voltage = ((float)(dac_code + LTC2604_offset)* LTC2604_lsb); //! 1) Calculates the dac_voltage
return (dac_voltage);
}Download LTC2604 - Linduino Header File
/*!
LTC2604: Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
@verbatim
The LTC2604/LTC2614/LTC2624 are quad 16-,14- and 12-bit 2.5V to 5.5V
rail-to-rail voltage output DACs in 16-lead narrow SSOP packages. These
parts have separate reference inputs for each DAC. They have built-in
high performance output buffers and are guaranteed monotonic.
These parts establish advanced performance standards for output drive,
crosstalk and load regulation in single-supply, voltage output multiples.
SPI DATA FORMAT (MSB First):
24-Bit Load Sequence:
Byte #1 Byte #2 Byte #3
Command MSB LSB
LTC2604-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
LTC2604-14 : C3 C2 C1 C0 A3 A2 A1 A0 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 X X
LTC2604-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
LTC2604-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
LTC2604-14 : X X X X X X X X C3 C2 C1 C0 A3 A2 A1 A0 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 X X
LTC2604-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=DACA, 1=DACB, 2=DACC, 3=DACD, 0xFF=All DACs)
Dx : DAC Data Bits
X : Don't care
Example Code:
Set DAC A to to 2V for 16-bit DAC.
shift_count = 0; // 16-bit DAC does not have to be shifted
dac_voltage = 2.0; // Sets dac voltage variable to 2v
dac_code = LTC2604_voltage_to_code(dac_voltage, LTC2604_lsb, LTC2604_offset); // Calculate DAC code from voltage, lsb, and offset
LTC2604_write(LTC2604_CS, LTC2604_CMD_WRITE_UPDATE, LTC2604_DAC_A, dac_code << shift_count); // Set DAC A with DAC code
@endverbatim
http://www.linear.com/product/LTC2604
http://www.linear.com/product/LTC2604#demoboards
REVISION HISTORY
$Revision: 5670 $
$Date: 2016-09-02 10:55:41 -0700 (Fri, 02 Sep 2016) $
Copyright (c) 2014, Linear Technology Corp.(LTC)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, 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.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of Linear Technology Corp.
The Linear Technology Linduino is not affiliated with the official Arduino team.
However, the Linduino is only possible because of the Arduino team's commitment
to the open-source community. Please, visit http://www.arduino.cc and
http://store.arduino.cc , and consider a purchase that will help fund their
ongoing work.
*/
/*! @file
@ingroup LTC2604
Header for LTC2604: Quad 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
*/
#ifndef LTC2604_H
#define LTC2604_H
#include <SPI.h>
//! Define the SPI CS pin
#ifndef LTC2604_CS
#define LTC2604_CS QUIKEVAL_CS
#endif
//! @name LTC2604 Command Codes
//!@{
//! OR'd together with the DAC address to form the command byte
#define LTC2604_CMD_WRITE 0x00 //!< Write to input register n
#define LTC2604_CMD_UPDATE 0x10 //!< Update (power up) DAC register n
#define LTC2604_CMD_WRITE_UPDATE_ALL 0x20 //!< Write to input register n, update (power up) all
#define LTC2604_CMD_WRITE_UPDATE 0x30 //!< Write to input register n, update (power up) all
#define LTC2604_CMD_POWER_DOWN 0x40 //!< Power down n
#define LTC2604_CMD_NO_OPERATION 0xF0 //!< No operation
//!@}
/*!
| DAC Addresses | Value |
| :--------------------------: | :------: |
| LTC2605_DAC_A | 0x00 |
| LTC2605_DAC_B | 0x01 |
| LTC2605_DAC_C | 0x02 |
| LTC2605_DAC_D | 0x03 |
| LTC2605_DAC_ALL | 0x0F |
*/
/*! @name Dac Addresses
@{*/
// Which DAC to operate on
#define LTC2604_DAC_A 0x00
#define LTC2604_DAC_B 0x01
#define LTC2604_DAC_C 0x02
#define LTC2604_DAC_D 0x03
#define LTC2604_DAC_ALL 0x0F
//
//! Write the 16-bit dac_code to the LTC2604
//! @return Void
void LTC2604_write(uint8_t cs, //!< Chip Select Pin
uint8_t dac_command, //!< Command Nibble, left-justified, lower nibble set to zero
uint8_t dac_address, //!< DAC Address Nibble, right justified, upper nibble set to zero
uint16_t dac_code //!< 16-bit DAC code
);
//! Calculate a LTC2604 DAC code given the desired output voltage and DAC address (0-3)
//! @return The 16-bit code to send to the DAC
uint16_t LTC2604_voltage_to_code(float dac_voltage, //!< Voltage to send to DAC
float LTC2604_lsb, //!< LSB value (volts)
int16_t LTC2604_offset //!< Offset (volts)
);
//! Calculate the LTC2604 DAC output voltage given the DAC code, offset, and LSB value
//! @return Calculated voltage
float LTC2604_code_to_voltage(uint16_t dac_code, //!< DAC code
float LTC2604_lsb, //!< LSB value (volts)
int16_t LTC2604_offset //!< Offset (volts)
);
#endif //LTC2604_HTechnical Support
- For immediate technical assistance, contact your local sales office or distributor or call 1-800-4-LINEAR (US customers only) or 408-432-1900.
- For less urgent requests, please complete our Technical Support Request Form. Please allow 2-3 business days for reply.
