Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Linear Technology DC1096B Demonstration Board. More...

Detailed Description

Linear Technology DC1096B Demonstration Board.

LTC2642: 16-/14-/12-Bit VOUT DAC with SPI Interface

LTC2641: 16-/14-/12-Bit VOUT DAC with SPI Interface

NOTES

  Set the terminal baud rate to 115200 and select the newline terminator.
  No external power supply is required. Two on-board reference voltages of
  2.5V and 5V are available. The board features LTC2642A with direct and
  buffered output.

  The program displays calculated voltages which are based on the reference
  voltage used. A precision voltmeter is needed to verify the actual
  measured voltages against the calculated voltage displayed.

  There is also an option of generating a square wave of required voltage
  levels and frequency. This proves the fast settling time of the corresponding
  parts. Setting the software to unipolar or bipolar will not set the hardware
  to bipolar mode. The jumpers need to be placed in their proper positions in
  order to accomplish this.

  Jumper settings:
   JP3: Sets DAC2 to either unipolar or bipolar mode. In bipolar mode, set JP6
   and JP7 to EXT and apply an appropriate supply to AMP V+, AMP V–, and GND
   turret posts.

   JP4: Sets DAC3 to either unipolar or bipolar mode. In bipolar mode, set JP6
   and JP7 to EXT and apply an appropriate supply to AMP V+, AMP V–, and GND
   turret posts.

  Explanation of Commands:
   Option 1: Enter a digital value or voltage to obtain analog voltage output.
   Option 2: Enter the voltage levels to obtain a square wave.
   Option 3: Vary the reference voltage used.
   Option 4: Select Bipolar/Unipolar.

USER INPUT DATA FORMAT:
 decimal : 1024
 hex     : 0x400
 octal   : 02000  (leading 0 "zero")
 binary  : B10000000000
 float   : 1024.0

http://www.linear.com/product/LTC2642 http://www.linear.com/product/LTC2641

http://www.linear.com/product/LTC2642#demoboards http://www.linear.com/product/LTC2641#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 DC1096B.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 ()
 Prints main menu. More...
 
static uint8_t menu1_voltage_output ()
 Function to enter a digital value and get the analog output. More...
 
static uint8_t menu2_square_wave_output ()
 Function to generate a square wave of desired frequency and voltage ranges. More...
 
static void menu3_change_reference_voltage ()
 Function to change the reference voltage to be used. More...
 
static void menu4_select_range ()
 Select between unipolar/bipolar. More...
 
static void setup ()
 Initialize Linduino. More...
 
static void loop ()
 Repeats Linduino loop. 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 ()
 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...
 

Macros

#define VREF1   5.0
 
#define VREF2   2.5
 

Enumerations

enum  { PROMPT_VOLTAGE = 0, PROMPT_CODE = 1 }
 Used to choose between voltage and code. More...
 

Variables

static float reference_voltage = VREF1
 
static uint8_t range = UNIPOLAR
 

Function Documentation

◆ get_code()

static uint16_t get_code ( )
static

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

Definition at line 300 of file DC1096B.ino.

◆ get_voltage()

static uint16_t get_voltage ( )
static

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

Definition at line 287 of file DC1096B.ino.

◆ loop()

static void loop ( void  )
static

Repeats Linduino loop.

Definition at line 152 of file DC1096B.ino.

◆ menu1_voltage_output()

static uint8_t menu1_voltage_output ( )
static

Function to enter a digital value and get the analog output.

Definition at line 186 of file DC1096B.ino.

◆ menu2_square_wave_output()

static uint8_t menu2_square_wave_output ( )
static

Function to generate a square wave of desired frequency and voltage ranges.

Definition at line 206 of file DC1096B.ino.

◆ menu3_change_reference_voltage()

static void menu3_change_reference_voltage ( )
static

Function to change the reference voltage to be used.

Definition at line 241 of file DC1096B.ino.

◆ menu4_select_range()

static void menu4_select_range ( )
static

Select between unipolar/bipolar.

Definition at line 250 of file DC1096B.ino.

◆ print_prompt()

static void print_prompt ( )
static

Prints main menu.

Definition at line 326 of file DC1096B.ino.

◆ print_title()

static void print_title ( void  )
static

Prints the title block when program first starts.

Definition at line 314 of file DC1096B.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.

Definition at line 272 of file DC1096B.ino.

◆ setup()

static void setup ( void  )
static

Initialize Linduino.

Definition at line 129 of file DC1096B.ino.

Macro Definition Documentation

◆ VREF1

#define VREF1   5.0

Definition at line 106 of file DC1096B.ino.

◆ VREF2

#define VREF2   2.5

Definition at line 107 of file DC1096B.ino.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Used to choose between voltage and code.

Enumerator
PROMPT_VOLTAGE 

0

PROMPT_CODE 

1

Definition at line 122 of file DC1096B.ino.

Variable Documentation

◆ range

uint8_t range = UNIPOLAR
static

Definition at line 111 of file DC1096B.ino.

◆ reference_voltage

float reference_voltage = VREF1
static

Definition at line 110 of file DC1096B.ino.