| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Enumerations | Variables
DC579A.ino File Reference
Digital-to-Analog Converters (DAC) » LTC2600: Octal 16-Bit Rail-to-Rail DACs in 16-Lead SSOP

LTC2600: Octal 16-Bit Rail-to-Rail DACs in 16-Lead SSOP. More...

## Detailed Description

LTC2600: Octal 16-Bit Rail-to-Rail DACs in 16-Lead SSOP.

    The LTC2600/LTC2610/LTC2620 are octal 16-, 14- and 12-bit, 2.5V-to-5.5V
    rail-to-rail voltage-output DACs in 16-lead narrow SSOP and 20-lead 4mm × 5mm
    QFN packages. 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.

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

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

Definition in file DC579A.ino.

Go to the source code of this file.

## Functions
static void | print_title ()
| Prints the title block when program first starts. More...
static void | print_prompt (int16_t selected_dac)
| Prints main menu. More...
static int16_t | prompt_voltage_or_code ()
| Prompt user to enter a voltage or digital code to send to DAC. More...
static uint16_t | get_voltage (float LTC2600_lsb, int16_t LTC2600_offset)
| Get voltage from user input, calculate DAC code based on lsb, offset. More...
static uint16_t | get_code ()
| Get code to send to DAC directly, in decimal, hex, or binary. More...
static void | menu_1_select_dac (int16_t *selected_dac)
| Select which DAC to operate on. More...
static void | menu_2_write_to_input_register (int16_t selected_dac)
| Write data to input register, but do not update DAC output. More...
static void | menu_3_write_and_update_dac (int16_t selected_dac)
| Write data to DAC register (which updates output immediately) More...
static void | menu_4_update_power_up_dac (int16_t selected_dac)
| Update DAC with data that is stored in input register, power up if sleeping. More...
static void | menu_5_power_down_dac (int16_t selected_dac)
| Power down DAC. More...
static void | setup ()
| Initialize Linduino. More...
static void | loop ()
| Repeats Linduino loops. More...

## Enumerations
enum | { PROMPT_VOLTAGE = 0, PROMPT_CODE = 1 }
| Used to keep track to print voltage or print code. More...

## Variables
static uint8_t | demo_board_connected
| set to 1 if the board is connected More...
static uint8_t | shift_count =0
| The data align shift count for 16-bit =0 14-bit =2 12-bit =4. More...
static float | reference_voltage = 4.096
| set based on jumper positions More...
static int16_t | LTC2600_offset =0
static float | LTC2600_lsb = reference_voltage/ (pow(2,16) - 1)
const uint8_t | address_map [5] = {LTC2600_DAC_A, LTC2600_DAC_B, LTC2600_DAC_C, LTC2600_DAC_D, LTC2600_DAC_ALL}
| Lookup table for DAC address. More...

## Function Documentation

## ◆ get_code()

static uint16_t get_code | ( |  | ) |
| static

Get code to send to DAC directly, in decimal, hex, or binary.

Returns
  code from user

Definition at line 255 of file DC579A.ino.

## ◆ get_voltage()

static uint16_t get_voltage | ( | float | LTC2600_lsb,
|  | int16_t | LTC2600_offset
| ) |  |
| static

Get voltage from user input, calculate DAC code based on lsb, offset.

Returns
  the DAC code

Parameters

  LTC2600_lsb | the voltage LSB of the DAC
  LTC2600_offset | the Offset of the DAC

Definition at line 240 of file DC579A.ino.

## ◆ loop()

static void loop | ( | void |  | ) |
| static

Repeats Linduino loops.

Definition at line 126 of file DC579A.ino.

## ◆ menu_1_select_dac()

static void menu_1_select_dac | ( | int16_t * | selected_dac | ) |
| static

Select which DAC to operate on.

Parameters

  selected_dac | what DAC to operate on

Definition at line 165 of file DC579A.ino.

## ◆ menu_2_write_to_input_register()

static void menu_2_write_to_input_register | ( | int16_t | selected_dac | ) |
| static

Write data to input register, but do not update DAC output.

Parameters

  selected_dac | what DAC to operate on

Definition at line 182 of file DC579A.ino.

## ◆ menu_3_write_and_update_dac()

static void menu_3_write_and_update_dac | ( | int16_t | selected_dac | ) |
| static

Write data to DAC register (which updates output immediately)

Parameters

  selected_dac | what DAC to operate on

Definition at line 195 of file DC579A.ino.

## ◆ menu_4_update_power_up_dac()

static void menu_4_update_power_up_dac | ( | int16_t | selected_dac | ) |
| static

Update DAC with data that is stored in input register, power up if sleeping.

Parameters

  selected_dac | what DAC to operate on

Definition at line 208 of file DC579A.ino.

## ◆ menu_5_power_down_dac()

static void menu_5_power_down_dac | ( | int16_t | selected_dac | ) |
| static

Power down DAC.

Parameters

  selected_dac | what DAC to operate on

Definition at line 215 of file DC579A.ino.

## ◆ print_prompt()

static void print_prompt | ( | int16_t | selected_dac | ) |
| static

Prints main menu.

Parameters

  selected_dac | what DAC to operate on

Definition at line 283 of file DC579A.ino.

## ◆ print_title()

static void print_title | ( | void |  | ) |
| static

Prints the title block when program first starts.

Definition at line 268 of file DC579A.ino.

## ◆ prompt_voltage_or_code()

static int16_t prompt_voltage_or_code | ( |  | ) |
| static

Prompt user to enter a voltage or digital code to send to DAC.

Returns
  user input

Definition at line 224 of file DC579A.ino.

## ◆ setup()

static void setup | ( | void |  | ) |
| static

Initialize Linduino.

Definition at line 107 of file DC579A.ino.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Used to keep track to print voltage or print code.

Enumerator
PROMPT_VOLTAGE | 0
PROMPT_CODE | 1

Definition at line 100 of file DC579A.ino.

## Variable Documentation

## ◆ address_map

const uint8_t address_map[5] = {LTC2600_DAC_A, LTC2600_DAC_B, LTC2600_DAC_C, LTC2600_DAC_D, LTC2600_DAC_ALL}

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. Map entered option 0..2 to DAC address

Definition at line 97 of file DC579A.ino.

## ◆ demo_board_connected

uint8_t demo_board_connected
| static

set to 1 if the board is connected

Definition at line 87 of file DC579A.ino.

## ◆ LTC2600_lsb

float LTC2600_lsb = reference_voltage/ (pow(2,16) - 1)
| static

Definition at line 91 of file DC579A.ino.

## ◆ LTC2600_offset

int16_t LTC2600_offset =0
| static

Definition at line 90 of file DC579A.ino.

## ◆ reference_voltage

float reference_voltage = 4.096
| static

set based on jumper positions

Definition at line 89 of file DC579A.ino.

## ◆ shift_count

uint8_t shift_count =0
| static

The data align shift count for 16-bit =0 14-bit =2 12-bit =4.

Definition at line 88 of file DC579A.ino.