Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

LTC2637: Octal 12-/10-/8-Bit I2C VOUT DACs with 10ppm/°C Reference. More...

Detailed Description

LTC2637: Octal 12-/10-/8-Bit I2C VOUT DACs with 10ppm/°C Reference.

The LTC2637 is a family of octal I2C 16-/12-Bit Rail-to-Rail DACs with
Integrated 10ppm/C Max Reference. The DACs have built-in high performance,
rail-to-rail, output buffers and are guaranteed monotonic. The LTC2637-L has a
full-scale output of 2.5V with the integrated reference and operates from a
single 2.7V to 5.5V supply. The LTC2637-H has a full-scale output of 4.096V with
the integrated reference and operates from a 4.5V to 5.5V supply. Each DAC can
also operate with an external reference, which sets the full-scale output to 2
times the external reference voltage.

The parts use a 2-wire I2C compatible serial interface. The LTC2637 operates in
both the standard mode (maximum clock rate of 100kHz) and the fast mode (maximum
clock rate of 400kHz). The LTC2637 incorporates a power-on reset circuit that is
controlled by the PORSEL pin. If PORSEL is tied to GND the DACs reset to
zero-scale at power-up. If PORSEL is tied to VCC, the DACs reset to mid-scale at
power-up.

I2C DATA FORMAT (MSB First):
             Byte #1                                    Byte #2

LTC2637-12 : START  SA6 SA5 SA4 SA3 SA2 SA1 SA0 W SACK  C3 C2 C1 C0 A3 A2 A1 A0 SACK
LTC2637-10 : START  SA6 SA5 SA4 SA3 SA2 SA1 SA0 W SACK  C3 C2 C1 C0 A3 A2 A1 A0 SACK
LTC2637- 8 : START  SA6 SA5 SA4 SA3 SA2 SA1 SA0 W SACK  C3 C2 C1 C0 A3 A2 A1 A0 SACK

Byte #3                             Byte #4
MSB                                 LSB
D11 D10 D9  D8  D7  D6  D5 D4 SACK  D3 D2 D1 D0 X  X  X  X  SACK  STOP
D9  D8  D7  D6  D5  D4  D3 D2 SACK  D1 D0 X  X  X  X  X  X  SACK  STOP
D7  D6  D5  D4  D3  D2  D1 D0 SACK  X  X  X  X  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, 4=DACE, 5=DACF, 6=DACG, 7=DACH, 0xFF=All DACs)
Dx   : DAC Data Bits
X    : Don't care
STOP : I2C Stop

Example Code:

Set DAC A to to 2V for 12-bit DAC.

    shift_count = 4;    // 16-bit DAC does not have to be shifted
    dac_voltage = 2.0;  // Sets dac voltage variable to 2v

    dac_code = LTC2637_voltage_to_code(dac_voltage, LTC2637_lsb, LTC2637_offset);   // Calculate DAC code from voltage, lsb, and offset
    ack = LTC2637_write(LTC2637_I2C_ADDRESS, LTC2637_CMD_WRITE_UPDATE, LTC2637_DAC_A, dac_code << shift_count);    // Set DAC A with DAC code

http://www.linear.com/product/LTC2637

http://www.linear.com/product/LTC2635

http://www.linear.com/product/LTC2637#demoboards

http://www.linear.com/product/LTC2635#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:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • 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.
  • Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  • The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
  • Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

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 LTC2637 Octal 12-/10-/8-Bit I2C VOUT DACs with 10ppm/°C Reference

Definition in file LTC2637.h.

Go to the source code of this file.

Functions

int8_t LTC2637_write (uint8_t i2c_address, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
 Write a 16-bit dac_code to the LTC2637. More...
 
uint16_t LTC2637_voltage_to_code (float dac_voltage, float LTC2637_lsb, int16_t LTC2637_offset)
 Calculate a LTC2637 DAC code given the desired output voltage and DAC address (0-3) More...
 
float LTC2637_code_to_voltage (uint16_t dac_code, float LTC2637_lsb, int16_t LTC2637_offset)
 Calculate the LTC2637 DAC output voltage given the DAC code, offset, and LSB value. More...
 
void LTC2637_calibrate (uint16_t dac_code1, uint16_t dac_code2, float voltage1, float voltage2, float *LTC2637_lsb, int16_t *LTC2637_offset)
 Calculate the LTC2637 offset and LSB voltages given two measured voltages and their corresponding codes. More...
 

Macros

I2C_Addresses
#define LTC2637_I2C_ADDRESS   0x10
 
#define LTC2637_I2C_GLOBAL_ADDRESS   0x73
 
LTC2637 Command Codes

OR'd together with the DAC address to form the command byte

#define LTC2637_CMD_WRITE   0x00
 
#define LTC2637_CMD_UPDATE   0x10
 
#define LTC2637_CMD_WRITE_UPDATE   0x30
 
#define LTC2637_CMD_POWER_DOWN   0x40
 
#define LTC2637_CMD_POWER_DOWN_ALL   0x50
 
#define LTC2637_CMD_INTERNAL_REFERENCE   0x60
 
#define LTC2637_CMD_EXTERNAL_REFERENCE   0x70
 
#define LTC2637_CMD_NO_OPERATION   0xF0
 
LTC2637 DAC Addresses

Which DAC to operate on

#define LTC2637_DAC_A   0x00
 
#define LTC2637_DAC_B   0x01
 
#define LTC2637_DAC_C   0x02
 
#define LTC2637_DAC_D   0x03
 
#define LTC2637_DAC_E   0x04
 
#define LTC2637_DAC_F   0x05
 
#define LTC2637_DAC_G   0x06
 
#define LTC2637_DAC_H   0x07
 
#define LTC2637_DAC_ALL   0x0F
 

Function Documentation

◆ LTC2637_calibrate()

void LTC2637_calibrate ( uint16_t  dac_code1,
uint16_t  dac_code2,
float  voltage1,
float  voltage2,
float *  LTC2637_lsb,
int16_t *  LTC2637_offset 
)

Calculate the LTC2637 offset and LSB voltages given two measured voltages and their corresponding codes.

Returns
Void
Parameters
dac_code1First DAC code
dac_code2Second DAC code
voltage1First voltage
voltage2Second voltage
LTC2637_lsbReturns resulting LSB (volts)
LTC2637_offsetReturns resulting Offset (volts)

Definition at line 117 of file LTC2637.cpp.

◆ LTC2637_code_to_voltage()

float LTC2637_code_to_voltage ( uint16_t  dac_code,
float  LTC2637_lsb,
int16_t  LTC2637_offset 
)

Calculate the LTC2637 DAC output voltage given the DAC code, offset, and LSB value.

Returns
Calculated voltage
Parameters
dac_codeDAC code
LTC2637_lsbLSB value (volts)
LTC2637_offsetOffset (volts)

Definition at line 109 of file LTC2637.cpp.

◆ LTC2637_voltage_to_code()

uint16_t LTC2637_voltage_to_code ( float  dac_voltage,
float  LTC2637_lsb,
int16_t  LTC2637_offset 
)

Calculate a LTC2637 DAC code given the desired output voltage and DAC address (0-3)

Returns
The 16-bit code to send to the DAC
Parameters
dac_voltageVoltage to send to DAC
LTC2637_lsbLSB value (volts)
LTC2637_offsetOffset (volts)

Definition at line 96 of file LTC2637.cpp.

◆ LTC2637_write()

int8_t LTC2637_write ( uint8_t  i2c_address,
uint8_t  dac_command,
uint8_t  dac_address,
uint16_t  dac_code 
)

Write a 16-bit dac_code to the LTC2637.

Returns
ACK bit (0=acknowledge, 1=no acknowledge)
Parameters
i2c_addressI2C address of DAC
dac_commandCommand Nibble, left-justified, lower nibble set to zero
dac_addressDAC Address Nibble, right justified, upper nibble set to zero
dac_code16-bit DAC code

Definition at line 87 of file LTC2637.cpp.

Macro Definition Documentation

◆ LTC2637_CMD_EXTERNAL_REFERENCE

#define LTC2637_CMD_EXTERNAL_REFERENCE   0x70

Definition at line 158 of file LTC2637.h.

◆ LTC2637_CMD_INTERNAL_REFERENCE

#define LTC2637_CMD_INTERNAL_REFERENCE   0x60

Definition at line 157 of file LTC2637.h.

◆ LTC2637_CMD_NO_OPERATION

#define LTC2637_CMD_NO_OPERATION   0xF0

Definition at line 159 of file LTC2637.h.

◆ LTC2637_CMD_POWER_DOWN

#define LTC2637_CMD_POWER_DOWN   0x40

Definition at line 155 of file LTC2637.h.

◆ LTC2637_CMD_POWER_DOWN_ALL

#define LTC2637_CMD_POWER_DOWN_ALL   0x50

Definition at line 156 of file LTC2637.h.

◆ LTC2637_CMD_UPDATE

#define LTC2637_CMD_UPDATE   0x10

Definition at line 153 of file LTC2637.h.

◆ LTC2637_CMD_WRITE

#define LTC2637_CMD_WRITE   0x00

Definition at line 152 of file LTC2637.h.

◆ LTC2637_CMD_WRITE_UPDATE

#define LTC2637_CMD_WRITE_UPDATE   0x30

Definition at line 154 of file LTC2637.h.

◆ LTC2637_DAC_A

#define LTC2637_DAC_A   0x00

Definition at line 165 of file LTC2637.h.

◆ LTC2637_DAC_ALL

#define LTC2637_DAC_ALL   0x0F

Definition at line 173 of file LTC2637.h.

◆ LTC2637_DAC_B

#define LTC2637_DAC_B   0x01

Definition at line 166 of file LTC2637.h.

◆ LTC2637_DAC_C

#define LTC2637_DAC_C   0x02

Definition at line 167 of file LTC2637.h.

◆ LTC2637_DAC_D

#define LTC2637_DAC_D   0x03

Definition at line 168 of file LTC2637.h.

◆ LTC2637_DAC_E

#define LTC2637_DAC_E   0x04

Definition at line 169 of file LTC2637.h.

◆ LTC2637_DAC_F

#define LTC2637_DAC_F   0x05

Definition at line 170 of file LTC2637.h.

◆ LTC2637_DAC_G

#define LTC2637_DAC_G   0x06

Definition at line 171 of file LTC2637.h.

◆ LTC2637_DAC_H

#define LTC2637_DAC_H   0x07

Definition at line 172 of file LTC2637.h.

◆ LTC2637_I2C_ADDRESS

#define LTC2637_I2C_ADDRESS   0x10

Definition at line 118 of file LTC2637.h.

◆ LTC2637_I2C_GLOBAL_ADDRESS

#define LTC2637_I2C_GLOBAL_ADDRESS   0x73

Definition at line 146 of file LTC2637.h.