LTC2605 - Octal I²C 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
Features
- Smallest Pin-Compatible Octal DACs:
LTC2605: 16 Bits
LTC2615: 14 Bits
LTC2625: 12 Bits - Guaranteed Monotonic Over Temperature
- 400kHz I2C Interface
- Wide 2.7V to 5.5V Supply Range
- Low Power Operation: 250µA per DAC at 3V
- Individual Channel Power-Down to 1µA, Max
- Ultralow Crosstalk Between DACs (<10µV)
- High Rail-to-Rail Output Drive (±15mA, Min)
- Double-Buffered Digital Inputs
- 27 Selectable Addresses
- LTC2605/LTC2615/LTC2625: Power-On Reset to Zero Scale
- LTC2605-1/LTC2615-1/LTC2625-1: Power-On Reset to Midscale
- Tiny 16-Lead Narrow SSOP Package
Typical Application
Description
The LTC2605/LTC2615/LTC2625 are octal 16-, 14- and 12-bit, 2.7V to 5.5V rail-to-rail voltage-output DACs in 16-lead narrow SSOP packages. They have built-in high performance output buffers and are guaranteed monotonic.
These parts establish new board-density benchmarks for 16- and 14-bit DACs and advance performance standards for output drive, crosstalk and load regulation in single-supply, voltage-output multiples.
The parts use the 2-wire I2C compatible serial interface. The LTC2605/LTC2615/LTC2625 operate in both the standard mode (maximum clock rate of 100kHz) and the fast mode (maximum clock rate of 400kHz).
The LTC2605/LTC2615/LTC2625 incorporate a power-on 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 LTC2605-1/LTC2615-1/LTC2625-1 to midscale. The voltage output stays at midscale until a valid write and update takes 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 |
|---|---|---|---|---|---|
| LTC2605CGN-1#PBF | SSOP-16 | GN | C | 05-08-1641 (GN16) | Yes |
| LTC2605CGN-1#TRPBF | SSOP-16 | GN | C | 05-08-1641 (GN16) | Yes |
| LTC2605CGN#PBF | SSOP-16 | GN | C | 05-08-1641 (GN16) | Yes |
| LTC2605CGN#TRPBF | SSOP-16 | GN | C | 05-08-1641 (GN16) | Yes |
| LTC2605IGN-1#PBF | SSOP-16 | GN | I | 05-08-1641 (GN16) | Yes |
| LTC2605IGN-1#TRPBF | SSOP-16 | GN | I | 05-08-1641 (GN16) | Yes |
| LTC2605IGN#PBF | SSOP-16 | GN | I | 05-08-1641 (GN16) | Yes |
| LTC2605IGN#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 | |
|---|---|---|---|---|---|---|
| LTC2605CGN-1#PBF | SSOP-16 | C | $21.00 | $14.70 | Yes | |
| LTC2605CGN-1#TRPBF | SSOP-16 | C | $14.76 | Yes | ||
| LTC2605CGN#PBF | SSOP-16 | C | $21.00 | $14.70 | Yes | |
| LTC2605CGN#TRPBF | SSOP-16 | C | $14.76 | Yes | ||
| LTC2605IGN-1#PBF | SSOP-16 | I | $25.20 | $17.64 | Yes | |
| LTC2605IGN-1#TRPBF | SSOP-16 | I | $17.70 | Yes | ||
| LTC2605IGN#PBF | SSOP-16 | I | $25.20 | $17.64 | Yes | |
| LTC2605IGN#TRPBF | SSOP-16 | I | $17.70 | 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 |
|---|---|---|---|
| DC935A | LTC2605 Octal 16-bit I2C Vout DAC (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
- LT5400 - Quad Matched Resistor Network
- LTC6655 - 0.25ppm Noise, Low Drift Precision References
- LT3080 - Adjustable 1.1A Single Resistor Low Dropout Regulator
- LTC2657 - Octal I2C 16-/12-Bit Rail-to-Rail DACs with 10ppm/°C Max Reference
- LTC2600 - Octal 16-Bit Rail-to-Rail DACs in 16-Lead SSOP
- LTC2655 - Quad I2C 16-/12-Bit Rail-to-Rail DACs with 10ppm/°C Max Reference
- LTM2883 - SPI/Digital or I2C μModule Isolator with Adjustable ±12.5V and 5V Regulated Power
- LTC2990 - Quad I2C Voltage, Current and Temperature Monitor
- LT1028 - Ultra Low Noise Precision High Speed Op Amps
- LTC2400 - 24-Bit µPower No Latency Delta-Sigma ADC in SO-8
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 LTC2605 - DC935A Linduino .INO File
/*!
Linear Technology DC935A Demonstration Board
LTC2605: Octal 16-/14-/12-Bit Rail-to Rail DACs in 16-Lead SSOP
@verbatim
NOTES
Setup:
Set the terminal baud rate to 115200 and select the newline terminator.
The program displays calculated voltages which are based on the voltage
of the reference used, be it internal or external. A precision voltmeter
is needed to verify the actual measured voltages against the calculated
voltage displayed. If an external reference is used, a precision voltage
source is required to apply the external reference voltage. A precision
voltmeter is also required to measure the external reference voltage.
No external power supply is required. Any assembly option may be used:
Explanation of Commands:
1- Select DAC: Select one of four DACs to test: A, B, C, D.
2- Write to DAC input register: Value is stored in the DAC for updating
later, allowing multiple channels to be updated at once, either
through a software "Update All" command or by asserting the LDAC# pin.
User will be prompted to enter either a code in hex or decimal, or a
voltage. If a voltage is entered, a code will be calculated based on
the active scaling and reference parameters - ideal values if no
calibration was ever stored.
3- Write and Update: Similar to item 1, but DAC is updated immediately.
4- Update DAC: Copies the value from the input register into the DAC
Register. Note that a "write and update" command writes the code to
BOTH the input register and DAC register, so subsequent "update" commands
will simply re-copy the same data (no change in output).
5- Power Down DAC: Disable DAC output. Power supply current is reduced. DAC
code present in DAC registers at time of shutdown are preserved.
USER INPUT DATA FORMAT:
decimal : 1024
hex : 0x400
octal : 02000 (leading 0 "zero")
binary : B10000000000
float : 1024.0
@endverbatim
http://ww.linear.com/product/LTC2605
http://www.linear.com/product/LTC2605#demoboards
REVISION HISTORY
$Revision: 5671 $
$Date: 2016-09-02 11:32:54 -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 LTC2605
*/
#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 "LTC2605.h"
#include <Wire.h>
#include <SPI.h>
// DAC Reference State
// Could have been 0 or 1. This allows you to use the
// variable "reference_mode" as the command argument to a write
#define REF_INTERNAL LTC2605_CMD_INTERNAL_REFERENCE //!< Stored reference state is Internal
#define REF_EXTERNAL LTC2605_CMD_EXTERNAL_REFERENCE //!< Stored reference state is External
//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 LTC2605_lsb, int16_t LTC2605_offset);
uint16_t get_code();
int8_t calibrate_dac(uint8_t index); // Calibrate the selected DAC using a voltmeter. The routine does a linear curve fit given two data points.
int8_t menu_1_select_dac(int16_t *selected_dac);
int8_t menu_2_write_to_input_register(int16_t selected_dac);
int8_t menu_3_write_and_update_dac(int16_t selected_dac);
int8_t menu_4_update_power_up_dac(int16_t selected_dac);
int8_t 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, for 14 bits=2 for 12-bits=4
static uint8_t reference_mode = REF_INTERNAL; //!< Tells whether to set internal or external reference
// Global calibration variables
static float reference_voltage= 5; //!< Reference voltage, either internal or external
static int16_t LTC2605_offset = 0; //!< DAC offset
static float LTC2605_lsb = (reference_voltage / (pow(2,16) -1)); // least signifigant bit value of the dac
// 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[9] = {LTC2605_DAC_A, LTC2605_DAC_B, LTC2605_DAC_C, LTC2605_DAC_D, LTC2605_DAC_E, LTC2605_DAC_F , LTC2605_DAC_G, LTC2605_DAC_H, LTC2605_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
{
quikeval_I2C_init(); // Configure the EEPROM I2C port for 100khz
quikeval_I2C_connect(); // Connect I2C to main data port
Serial.begin(115200);
print_title();
//if(demo_board_connected)
demo_board_connected = true;
print_prompt(0);
LTC2605_write(LTC2605_I2C_ADDRESS, LTC2605_CMD_NO_OPERATION, LTC2605_DAC_ALL, 0x0000);
Serial.flush();
}
//! Repeats Linduino loop
void loop()
{
int8_t ack =0;
int16_t user_command;
static int16_t selected_dac =0; // The selected DAC to be updated (0=A, 1=B ... 9=All). Initialized to "A"
// the main control loop
if (demo_board_connected) // do nothing if board is not connected
{
if (Serial.available()) // check for user input
{
user_command = read_int();
Serial.println(user_command);
Serial.flush();
ack =0;
switch (user_command)
{
case 1:
ack |= menu_1_select_dac(&selected_dac);
break;
case 2:
ack |= menu_2_write_to_input_register(selected_dac);
break;
case 3:
ack |= menu_3_write_and_update_dac(selected_dac);
break;
case 4:
ack |= menu_4_update_power_up_dac(selected_dac);
break;
case 5:
ack |= menu_5_power_down_dac(selected_dac);
break;
default:
Serial.println("Incorrect Option");
break;
}
if (ack)Serial.println("I2C NACK received, check address\n");
Serial.println("\n*****************************************************************");
print_prompt(selected_dac);
}
}
}
// Function Definitions
//! Select which DAC to operate on
//! @return 0
int8_t 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=E, 5=F, 6=G, 7=H, 8=All)");
*selected_dac = read_int();
if (*selected_dac == 8)
Serial.println("All");
else
Serial.println(*selected_dac);
return(0);
}
//! Write data to input register, but do not update DAC output
//! @return ACK bit (0=acknowledge, 1=no acknowledge)
int8_t menu_2_write_to_input_register(int16_t selected_dac) //!< what DAC to operate on
{
int8_t ack=0;
uint16_t dac_code;
if (prompt_voltage_or_code() == PROMPT_VOLTAGE)
dac_code = get_voltage(LTC2605_lsb, LTC2605_offset);
else
dac_code = get_code();
Serial.print("DAC code transmitted: 0x");
Serial.println(dac_code,HEX);
ack |= LTC2605_write(LTC2605_I2C_ADDRESS, LTC2605_CMD_WRITE, address_map[selected_dac], dac_code << shift_count);
return (ack);
}
//!Write data to DAC register (which updates output immediately)
//! @return ACK bit (0=acknowledge, 1=no acknowledge)
int8_t menu_3_write_and_update_dac(int16_t selected_dac) //!< what DAC to operate on
{
int8_t ack=0;
uint16_t dac_code;
if (prompt_voltage_or_code() == PROMPT_VOLTAGE)
dac_code = get_voltage(LTC2605_lsb, LTC2605_offset);
else
dac_code = get_code();
//Serial.print("lsb:");
//Serial.println(LTC2605_lsb);
Serial.print("DAC code transmitted: 0x");
Serial.println(dac_code,HEX);
ack |= LTC2605_write(LTC2605_I2C_ADDRESS, LTC2605_CMD_WRITE_UPDATE, address_map[selected_dac], dac_code << shift_count);
return (ack);
}
//! Update DAC with data that is stored in input register, power up if sleeping
//! @return ACK bit (0=acknowledge, 1=no acknowledge)
int8_t menu_4_update_power_up_dac(int16_t selected_dac) //!< what DAC to operate on
{
// Update DAC
int8_t ack=0;
ack |= LTC2605_write(LTC2605_I2C_ADDRESS, LTC2605_CMD_UPDATE, address_map[selected_dac], 0x0000);
return (ack);
}
//! Power down DAC
//! @return ACK bit (0=acknowledge, 1=no acknowledge)
int8_t menu_5_power_down_dac(int16_t selected_dac) //!< what DAC to operate on
{
// Power down DAC
int8_t ack=0;
ack |= LTC2605_write(LTC2605_I2C_ADDRESS, LTC2605_CMD_POWER_DOWN, address_map[selected_dac], 0x0000);
return (ack);
}
//! Prompt user to enter a voltage or digital code to send to DAC
//! @return prompt type
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
//! @return voltage
uint16_t get_voltage(float LTC2605_lsb, //!< the voltage LSB of the DAC
int16_t LTC2605_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(LTC2605_voltage_to_code(dac_voltage, LTC2605_lsb, LTC2605_offset));
}
//! Get code to send to DAC directly, in decimal, hex, or binary
//! @return DAC code
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.print("code corresponding to voltage: ");
Serial.print(LTC2605_code_to_voltage( returncode, LTC2605_lsb,LTC2605_offset));
Serial.println(" V");
Serial.flush();
return(returncode);
}
//! Prints the title block when program first starts.
void print_title()
{
Serial.println("");
Serial.println(F("*****************************************************************"));
Serial.println(F("* DC935 Demonstration Program *"));
Serial.println(F("* *"));
Serial.println(F("* This program demonstrates how to send data to the LTC2605 *"));
Serial.println(F("* octo 16/14/12-bit DAC found on the DC935 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 Code: 0x");
// Serial.println(code[selected_dac], HEX);
// Serial.print(" Calculated DAC Output Voltage = ");
// Serial.print(voltage, 4);
// Serial.println(" V");
Serial.print(" DAC Reference: ");
if (reference_mode == REF_INTERNAL)
Serial.println("Internal");
else
{
Serial.print(F("External "));
Serial.print(reference_voltage, 5);
Serial.println(F("V reference, please verify"));
Serial.print(F("Enter a command:"));
}
Serial.flush();
}Download LTC2605 - Linduino CPP File
/*!
LTC2605: Octal 16-/14-/12-Bit Rail-to Rail DACs in 16-Lead SSOP
@verbatim
The LTC2605/LTC2615/LTC2625 are octal 16-, 14- and 12-bit, 2.7V to 5.5V
rail-to-rail voltage-output DACs in 16-lead narrow SSOP packages. They have
built-in high performance output buffers and are guaranteed monotonic.
These parts establish new board-density benchmarks for 16-/14-bit DACs and
advance performance standards for output drive, crosstalk and load regulation
in single supply, voltage-output multiples.
@endverbatim
http://www.linear.com/product/LTC2605
http://www.linear.com/product/LTC2605#demoboards
REVISION HISTORY
$Revision: 5671 $
$Date: 2016-09-02 11:32:54 -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 LTC2605 LTC2605: Octal 16-/14-/12-Bit Rail-to Rail DACs in 16-Lead SSOP
/*! @file
@ingroup LTC2605
Library for LTC2605: Octal 16-/14-/12-Bit Rail-to Rail DACs in 16-Lead SSOP
*/
#include <Arduino.h>
#include <stdint.h>
#include <math.h>
#include "Linduino.h"
#include "LT_I2C.h"
#include "LTC2605.h"
// Write the dac_command byte and 16-bit dac_code to the LTC2605.
// The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.
int8_t LTC2605_write(uint8_t i2c_address, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
{
int8_t ack;
ack = i2c_write_word_data(i2c_address, dac_command | dac_address, dac_code);
return(ack);
}
// Calculate a LTC26505 DAC code given the desired output voltage and DAC address (0-3)
uint16_t LTC2605_voltage_to_code(float dac_voltage, float LTC2605_lsb, int16_t LTC2605_offset)
{
int32_t dac_code;
float float_code;
float_code = dac_voltage / LTC2605_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 - LTC2605_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 LTC2605 DAC output voltage given the DAC code and DAC address (0-3)
float LTC2605_code_to_voltage(uint16_t dac_code, float LTC2605_lsb, int16_t LTC2605_offset)
{
float dac_voltage;
dac_voltage = ((float)(dac_code + LTC2605_offset)* LTC2605_lsb); //! 1) Calculates the dac_voltage
return (dac_voltage);
}Download LTC2605 - Linduino Header File
/*!
LTC2605: Octal 16-/14-/12-Bit Rail-to Rail DACs in 16-Lead SSOP
@verbatim
The LTC2605/LTC2615/LTC2625 are octal 16-, 14- and 12-bit, 2.7V to 5.5V
rail-to-rail voltage-output DACs in 16-lead narrow SSOP packages. They have
built-in high performance output buffers and are guaranteed monotonic.
These parts establish new board-density benchmarks for 16-/14-bit DACs and
advance performance standards for output drive, crosstalk and load regulation
in single supply, voltage-output multiples.
I2C DATA FORMAT (MSB First):
Byte #1 Byte #2
MSB
LTC2655-16 : START SA6 SA5 SA4 SA3 SA2 SA1 SA0 W SACK C3 C2 C1 C0 A3 A2 A1 A0 SACK
LTC2655-12 : START SA6 SA5 SA4 SA3 SA2 SA1 SA0 W SACK C3 C2 C1 C0 A3 A2 A1 A0 SACK
Byte #3 Byte #4
LSB
D15 D14 D13 D12 D11 D10 D9 D8 SACK D7 D6 D5 D4 D3 D2 D1 D0 SACK STOP
D11 D10 D9 D8 D7 D6 D5 D4 SACK D3 D2 D1 D0 X X X X SACK STOP
START: I2C Start
SAx : I2C Address
W : I2C Write (0)
SACK : I2C Slave Generated Acknowledge (Active Low)
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
STOP : I2C Stop
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 = LTC2605_voltage_to_code(dac_voltage, LTC2605_lsb, LTC2605_offset); // Calculate DAC code from voltage, lsb, and offset
ack = LTC2655_write(LTC2605_I2C_ADDRESS, LTC2605_CMD_WRITE_UPDATE, LTC2605_DAC_A, dac_code); // Set DAC A with DAC code
@endverbatim
http://www.linear.com/product/LTC2605
http://www.linear.com/product/LTC2605#demoboards
REVISION HISTORY
$Revision: 5671 $
$Date: 2016-09-02 11:32:54 -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 LTC2605
Header for LTC2605: Octal 16-/14-/12-Bit Rail-to Rail DACs in 16-Lead SSOP
*/
#ifndef LTC2605_H
#define LTC2605_H
#include <Wire.h>
//!Use table to select address
/*!
|LTC2604 I2C Address Assignment| Value | AD2 | AD1 | AD0 |
| :--------------------------: | :------: | :------: |:------: | :------: |
| LTC2605_I2C_ADDRESS | 0x10 | GND | GND | GND |
| LTC2605_I2C_ADDRESS | 0x11 | GND | GND | Float |
| LTC2605_I2C_ADDRESS | 0x12 | GND | GND | Vcc |
| LTC2605_I2C_ADDRESS | 0x13 | GND | Float | GND |
| LTC2605_I2C_ADDRESS | 0x20 | GND | Float | Float |
| LTC2605_I2C_ADDRESS | 0x21 | GND | Float | Vcc |
| LTC2605_I2C_ADDRESS | 0x22 | GND | Vcc | GND |
| LTC2605_I2C_ADDRESS | 0x23 | GND | Vcc | Float |
| LTC2605_I2C_ADDRESS | 0x30 | GND | Vcc | Vcc |
| LTC2605_I2C_ADDRESS | 0x31 | Float | GND | GND |
| LTC2605_I2C_ADDRESS | 0x32 | Float | GND | Float |
| LTC2605_I2C_ADDRESS | 0x33 | Float | GND | Vcc |
| LTC2605_I2C_ADDRESS | 0x40 | Float | Float | GND |
| LTC2605_I2C_ADDRESS | 0x41 | Float | Float | Float |
| LTC2605_I2C_ADDRESS | 0x42 | Float | Float | Vcc |
| LTC2605_I2C_ADDRESS | 0x43 | Float | Vcc | GND |
| LTC2605_I2C_ADDRESS | 0x50 | Float | Vcc | Float |
| LTC2605_I2C_ADDRESS | 0x51 | Float | Vcc | Vcc |
| LTC2605_I2C_ADDRESS | 0x52 | Vcc | GND | GND |
| LTC2605_I2C_ADDRESS | 0x53 | Vcc | GND | Float |
| LTC2605_I2C_ADDRESS | 0x60 | Vcc | GND | Vcc |
| LTC2605_I2C_ADDRESS | 0x61 | Vcc | Float | GND |
| LTC2605_I2C_ADDRESS | 0x62 | Vcc | Float | Float |
| LTC2605_I2C_ADDRESS | 0x63 | Vcc | Float | Vcc |
| LTC2605_I2C_ADDRESS | 0x70 | Vcc | Vcc | GND |
| LTC2605_I2C_ADDRESS | 0x71 | Vcc | Vcc | Float |
| LTC2605_I2C_ADDRESS | 0x72 | Vcc | Vcc | Vcc |
| LTC2605_I2C_GLOBAL_ADDRESS | 0x73 | X | X | X |
*/
/*! @name LTC2604 Address Assignments
@{ */
// I2C Address Choices:
// To choose an address, comment out all options except the
// configuration on the demo board.
// Address assignment
// LTC2605 I2C Address // AD2 AD1 AD0
// #define LTC2605_I2C_ADDRESS 0x10 // GND GND GND
// #define LTC2605_I2C_ADDRESS 0x11 // GND GND Float
// #define LTC2605_I2C_ADDRESS 0x12 // GND GND Vcc
// #define LTC2605_I2C_ADDRESS 0x13 // GND Float GND
// #define LTC2605_I2C_ADDRESS 0x20 // GND Float Float
// #define LTC2605_I2C_ADDRESS 0x21 // GND Float Vcc
// #define LTC2605_I2C_ADDRESS 0x22 // GND Vcc GND
// #define LTC2605_I2C_ADDRESS 0x23 // GND Vcc Float
// #define LTC2605_I2C_ADDRESS 0x30 // GND Vcc Vcc
// #define LTC2605_I2C_ADDRESS 0x31 // Float GND GND
// #define LTC2605_I2C_ADDRESS 0x32 // Float GND Float
// #define LTC2605_I2C_ADDRESS 0x33 // Float GND Vcc
// #define LTC2605_I2C_ADDRESS 0x40 // Float Float GND
// #define LTC2605_I2C_ADDRESS 0x41 // Float Float Float
// #define LTC2605_I2C_ADDRESS 0x42 // Float Float Vcc
// #define LTC2605_I2C_ADDRESS 0x43 // Float Vcc GND
// #define LTC2605_I2C_ADDRESS 0x50 // Float Vcc Float
// #define LTC2605_I2C_ADDRESS 0x51 // Float Vcc Vcc
// #define LTC2605_I2C_ADDRESS 0x52 // Vcc GND GND
// #define LTC2605_I2C_ADDRESS 0x53 // Vcc GND Float
// #define LTC2605_I2C_ADDRESS 0x60 // Vcc GND Vcc
// #define LTC2605_I2C_ADDRESS 0x61 // Vcc Float GND
// #define LTC2605_I2C_ADDRESS 0x62 // Vcc Float Float
// #define LTC2605_I2C_ADDRESS 0x63 // Vcc Float Vcc
// #define LTC2605_I2C_ADDRESS 0x70 // Vcc Vcc GND
// #define LTC2605_I2C_ADDRESS 0x71 // Vcc Vcc Float
#define LTC2605_I2C_ADDRESS 0x72 // Vcc Vcc Vcc
//#define LTC2605_I2C_GLOBAL_ADDRESS 0x73
//! @name LTC2655 Command Codes
//! @{
//! OR'd together with the DAC address to form the command byte
#define LTC2605_CMD_WRITE 0x00 //!< Write to input register n
#define LTC2605_CMD_UPDATE 0x10 //!< Update (power up) DAC register n
#define LTC2605_CMD_WRITE_UPDATE 0x30 //!< Write to input register n, update (power up) all
#define LTC2605_CMD_POWER_DOWN 0x40 //!< Power down n
#define LTC2605_CMD_POWER_DOWN_ALL 0x50 //!< Power down chip (all DACs and reference)
#define LTC2605_CMD_INTERNAL_REFERENCE 0x60 //!< Select internal reference (power up reference)
#define LTC2605_CMD_EXTERNAL_REFERENCE 0x70 //!< Select external reference (power down internal reference)
#define LTC2605_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_E | 0x04 |
| LTC2605_DAC_F | 0x05 |
| LTC2605_DAC_G | 0x06 |
| LTC2605_DAC_H | 0x07 |
| LTC2605_DAC_ALL | 0x0F |
*/
/*! @name Dac Addresses
@{*/
// Which DAC to operate on
#define LTC2605_DAC_A 0x00
#define LTC2605_DAC_B 0x01
#define LTC2605_DAC_C 0x02
#define LTC2605_DAC_D 0x03
#define LTC2605_DAC_E 0x04
#define LTC2605_DAC_F 0x05
#define LTC2605_DAC_G 0x06
#define LTC2605_DAC_H 0x07
#define LTC2605_DAC_ALL 0x0F
//! Write a 16-bit dac_code to the LTC2605.
//! @return ACK bit (0=acknowledge, 1=no acknowledge)
int8_t LTC2605_write(uint8_t i2c_address, //!< I2C address of DAC
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 LTC2605 DAC code given the desired output voltage
//! @return The 16-bit code to send to the DAC
uint16_t LTC2605_voltage_to_code(float dac_voltage, //!< Voltage to send to DAC
float LTC2605_lsb, //!< LSB value
int16_t LTC2605_offset //!< Offset
);
//! Calculate the LTC2605 DAC output voltage given the DAC code, offset, and LSB value
//! @return Calculated voltage
float LTC2605_code_to_voltage(uint16_t dac_code, //!< DAC code
float LTC2605_lsb, //!< LSB value
int16_t LTC2605_offset //!< Offset
);
#endif //LTC2605_H
Technical 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.
