| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Variables
DC1444A.ino File Reference
Analog-to-Digital Converters (ADC) » LTC2305: 2-channel, 12-Bit SAR ADC with I2C interface

Linear Technology DC1337A Demonstration Board. More...

## Detailed Description

Linear Technology DC1337A Demonstration Board.

LTC2301: 1-Channel, 12-Bit SAR ADC with I2C Interface. LTC2305: 2-Channel, 12-Bit SAR ADC with I2C Interface.

    NOTES
      Setup:
       Set the terminal baud rate to 115200 and select the newline terminator. Equipment
       required is a voltage source (preferably low-noise) and a precision voltmeter.
       Ensure all jumpers on the demo board are installed in their default positions
       from the factory. Refer to Demo Manual DC1444A.

     LTC2301
      How to test Differential Mode:
       Bipolar Mode:
        The voltage source should be connected between inputs VIN+ and VIN-. Ensure both
        inputs are within their specified absolute input voltage range. (It is easiest
        to tie the voltage source negative terminal to COM.) Ensure the voltage
        source is set within the range of 0V to +4.096V (differential voltage range).
        (Swapping input voltages results in a reversed polarity reading.)

       Unipolar Mode:
        The voltage source should be connected between inputs VIN+ and VIN-. Ensure both
        inputs are within their specified absolute input voltage range. (It is easiest
        to tie the voltage source negative terminal to COM.) Ensure the voltage
        source is set within the range of 0V to +4.096V (differential voltage range).

    LTC2305
      How to test Single-Ended mode:
       Bipolar Mode:
        The voltage source should be connected to input VCH0 or VCH1. Ensure the input is
        within its specified absolute input voltage range. (It is easiest
        to tie the voltage source negative terminal to COM.) Ensure the voltage
        source is set within the range of 0V to +4.096V.
        (Swapping input voltages results in a reversed polarity reading.)

       Unipolar Mode:
        The voltage source should be connected to input VCH0 or VCH1. Ensure the input is
        within its specified absolute input voltage range. (It is easiest
        to tie the voltage source negative terminal to COM.) Ensure the voltage
        source is set within the range of 0V to +4.096V.

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

http://www.linear.com/product/LTC2301 http://www.linear.com/product/LTC2305

http://www.linear.com/product/LTC2301#demoboards http://www.linear.com/product/LTC2305#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 DC1444A.ino.

Go to the source code of this file.

## Functions
static void | print_title ()
| Prints the title block when the program first starts. More...
static void | print_prompt ()
| Prints main menu. More...
static uint8_t | print_user_command_single_ended ()
| Display selected single-ended channels. More...
static int8_t | menu_1_read_input ()
| Read channels in single-ended mode. More...
static void | menu_2_select_part ()
| Sets LTC2305 to Single-Ended or Differential. More...
static void | menu_3_select_uni_bipolar ()
| Sets LTC230X to Bipolar or Unipolar. More...
static void | menu_4_select_single_ended_differential ()
| Sets LTC2305 single-ended or differential mode. More...
static void | menu_5_select_polarity ()
| Sets LTC2305 polarity in differential mode. More...
static int8_t | menu_6_sleep ()
| Sets LTC2305 Sleep Mode. More...
static void | menu_7_set_address ()
| Set the I2C 7 bit address. More...
static void | setup ()
| Initialize Linduino. More...
static void | loop ()
| Repeats Linduino loop. More...

## Variables
static uint8_t | demo_board_connected
| Set to 1 if the board is connected. More...
static uint8_t | single_ended_differential = LTC2305_SINGLE_ENDED_MODE
| LTC2305 Single-Ended or Differential mode selection. More...
static uint8_t | uni_bipolar = LTC2305_UNIPOLAR_MODE
| LTC2305 Unipolar or Bipolar mode selection. More...
static uint8_t | part = LTC2301
| LTC2301 or 2305 part selection. More...
static uint8_t | polarity = LTC2305_P0_N1
| LTC230X Input polarity selection. More...
static uint8_t | channel = LTC2305_CH0
| LTC2305 Channel selection. More...
static uint8_t | i2c_address = LTC2305_I2C_ADDRESS
| I2C address in 7 bit format for part. More...
static uint8_t | LTC2305_bits = 12
| Resolution (12 bits) More...
static float | LTC2305_vref = 4.096
const uint8_t | BUILD_COMMAND_SINGLE_ENDED [2] = {LTC2305_CH0, LTC2305_CH1}
| Builds the command for single-ended mode. More...

## Function Documentation

## ◆ loop()

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

Repeats Linduino loop.

Definition at line 148 of file DC1444A.ino.

## ◆ menu_1_read_input()

static int8_t menu_1_read_input | ( |  | ) |
| static

Read channels in single-ended mode.

Returns
  1 if successful, 0 if not

Definition at line 197 of file DC1444A.ino.

## ◆ menu_2_select_part()

static void menu_2_select_part | ( |  | ) |
| static

Sets LTC2305 to Single-Ended or Differential.

Definition at line 330 of file DC1444A.ino.

## ◆ menu_3_select_uni_bipolar()

static void menu_3_select_uni_bipolar | ( |  | ) |
| static

Sets LTC230X to Bipolar or Unipolar.

Definition at line 361 of file DC1444A.ino.

## ◆ menu_4_select_single_ended_differential()

static void menu_4_select_single_ended_differential | ( |  | ) |
| static

Sets LTC2305 single-ended or differential mode.

Definition at line 392 of file DC1444A.ino.

## ◆ menu_5_select_polarity()

static void menu_5_select_polarity | ( |  | ) |
| static

Sets LTC2305 polarity in differential mode.

Definition at line 424 of file DC1444A.ino.

## ◆ menu_6_sleep()

static int8_t menu_6_sleep | ( |  | ) |
| static

Sets LTC2305 Sleep Mode.

Returns
  1 if successful, 0 if not

Definition at line 456 of file DC1444A.ino.

## ◆ menu_7_set_address()

static void menu_7_set_address | ( |  | ) |
| static

Set the I2C 7 bit address.

Definition at line 478 of file DC1444A.ino.

## ◆ print_prompt()

static void print_prompt | ( |  | ) |
| static

Prints main menu.

Definition at line 508 of file DC1444A.ino.

## ◆ print_title()

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

Prints the title block when the program first starts.

Definition at line 490 of file DC1444A.ino.

## ◆ print_user_command_single_ended()

static uint8_t print_user_command_single_ended | ( |  | ) |
| static

Display selected single-ended channels.

Definition at line 523 of file DC1444A.ino.

## ◆ setup()

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

Initialize Linduino.

Definition at line 137 of file DC1444A.ino.

## Variable Documentation

## ◆ BUILD_COMMAND_SINGLE_ENDED

const uint8_t BUILD_COMMAND_SINGLE_ENDED[2] = {LTC2305_CH0, LTC2305_CH1}

Builds the command for single-ended mode.

Definition at line 134 of file DC1444A.ino.

## ◆ channel

uint8_t channel = LTC2305_CH0
| static

LTC2305 Channel selection.

Definition at line 127 of file DC1444A.ino.

## ◆ demo_board_connected

uint8_t demo_board_connected
| static

Set to 1 if the board is connected.

Definition at line 122 of file DC1444A.ino.

## ◆ i2c_address

uint8_t i2c_address = LTC2305_I2C_ADDRESS
| static

I2C address in 7 bit format for part.

Definition at line 128 of file DC1444A.ino.

## ◆ LTC2305_bits

uint8_t LTC2305_bits = 12
| static

Resolution (12 bits)

Definition at line 129 of file DC1444A.ino.

## ◆ LTC2305_vref

float LTC2305_vref = 4.096
| static

Definition at line 130 of file DC1444A.ino.

## ◆ part

uint8_t part = LTC2301
| static

LTC2301 or 2305 part selection.

Definition at line 125 of file DC1444A.ino.

## ◆ polarity

uint8_t polarity = LTC2305_P0_N1
| static

LTC230X Input polarity selection.

Definition at line 126 of file DC1444A.ino.

## ◆ single_ended_differential

uint8_t single_ended_differential = LTC2305_SINGLE_ENDED_MODE
| static

LTC2305 Single-Ended or Differential mode selection.

Definition at line 123 of file DC1444A.ino.

## ◆ uni_bipolar

uint8_t uni_bipolar = LTC2305_UNIPOLAR_MODE
| static

LTC2305 Unipolar or Bipolar mode selection.

Definition at line 124 of file DC1444A.ino.