| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Macros | Variables
DC939A.ino File Reference
Analog-to-Digital Converters (ADC) » LTC2484: 24-Bit Delta Sigma ADC with Easy Drive Input Current Cancellation

Linear Technology DC939A Demonstration Board. More...

## Detailed Description

Linear Technology DC939A Demonstration Board.

LTC2484: 24-Bit Delta Sigma ADC with Easy Drive Input Current Cancellation.

    NOTES
      Setup:
       Set the terminal baud rate to 115200 and select the newline terminator. Equipment
       required is a precision voltage source and a precision voltmeter. No external
       power supply is required. Ensure JP1 is in the +5V position.

      To Read data:
       The voltage source should be connected with positive lead to IN+ and negative
       lead to IN-. The voltage source negative output must also be connected to the GND
       pin in order to provide a ground-referenced voltage. Ensure voltage is within
       analog input voltage range -0.3V to +2.5V. Swapping input voltages results in a
       reversed polarity reading.

      How to calibrate:
        Short the inputs to ground to calibrate the offset. Next, hit ENTER (this takes
        the reading). Now apply approximately 2.49 volts to +IN, with -IN connected to
        ground. Measure this voltage with a precise voltmeter and enter this value.
        Calibration is now stored in EEPROM. Upon startup the calibration values will be
        restored.

        Explanation of Commands:

                               **** MAIN MENU ****

          0- Read- By entering this a voltage at the +IN, -IN terminals will be read.
          1- Set Rejection- Select this to access the Filter rejection menu. Follow
             command cues to enable desired rejection profile of on-chip digital filters.
          2- Select 2X Rate- This selection allows disabling of the autocalibration
             feature to achieve a benefit of twice the output rate.
          3- Calibrate Voltage- Follow the calibration cues to calibrate the device
             voltage.
          4- Calibrate Temperature- Select this and follow the cues if it is desired to
             calibrate the integrated
             temperature sensor.

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

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

http://www.linear.com/product/LTC2484#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 DC939A.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 int8_t | restore_calibration ()
| Read stored calibration parameters from nonvolatile EEPROM on demo board. More...
static void | store_calibration ()
| Store measured calibration parameters to nonvolatile EEPROM on demo board. More...
static uint8_t | build_adc_command (uint8_t temperature)
| Construct ADC command from rejection, input, and 2X parameters. More...
static uint8_t | menu_0_read ()
| Read ADC. More...
static void | menu_1_set_rejection ()
| Set rejection mode. More...
static void | menu_2_set_1X_2X ()
| Select 1X or 2X mode. More...
static uint8_t | menu_3_calibrate_voltage ()
| Calibrate ADC given two known inputs. More...
static uint8_t | menu_4_calibrate_temperature ()
| Calibrate Temperature given two known inputs. More...
static void | setup ()
| Initialize Linduino. More...
static void | loop ()
| Repeats Linduino loop. More...

## Macros
#define | REJECTION50_60 0
| 50-60Hz rejection More...
#define | REJECTION50 1
| 50Hz rejection More...
#define | REJECTION60 2
| 60Hz rejection More...

## Variables
static uint8_t | demo_board_connected
| Set to 1 if the board is connected. More...
static int8_t | adc_rejection = REJECTION50_60
| The LTC2484 rejection. More...
static int8_t | adc_2x = 0
| The LTC2484 2x speed mode. More...
static float | LTC2484_lsb = 9.3132258E-9
| Ideal LSB size, 5V/(2^29) for a 5V reference. More...
static int32_t | LTC2484_offset_code = 0
| Ideal offset. More...
static float | LTC2484_t0 = 27.0
| Nominal temperature. More...
static float | LTC2484_r0 = 45.097156E6
| ADC code at the nominal temperature (420mV default) More...
const uint16_t | MISO_TIMEOUT = 1000
| The MISO timeout (ms) More...

## Function Documentation

## ◆ build_adc_command()

static uint8_t build_adc_command | ( | uint8_t | temperature | ) |
| static

Construct ADC command from rejection, input, and 2X parameters.

Returns
  ADC command

Definition at line 297 of file DC939A.ino.

## ◆ loop()

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

Repeats Linduino loop.

Definition at line 158 of file DC939A.ino.

## ◆ menu_0_read()

static uint8_t menu_0_read | ( |  | ) |
| static

Read ADC.

Returns
  0 if successful, 1 if failure

Definition at line 332 of file DC939A.ino.

## ◆ menu_1_set_rejection()

static void menu_1_set_rejection | ( |  | ) |
| static

Set rejection mode.

Definition at line 374 of file DC939A.ino.

## ◆ menu_2_set_1X_2X()

static void menu_2_set_1X_2X | ( |  | ) |
| static

Select 1X or 2X mode.

Definition at line 402 of file DC939A.ino.

## ◆ menu_3_calibrate_voltage()

static uint8_t menu_3_calibrate_voltage | ( |  | ) |
| static

Calibrate ADC given two known inputs.

Returns
  0 if successful, 1 if failure

Definition at line 427 of file DC939A.ino.

## ◆ menu_4_calibrate_temperature()

static uint8_t menu_4_calibrate_temperature | ( |  | ) |
| static

Calibrate Temperature given two known inputs.

Returns
  0 if successful, 1 if failure

Definition at line 477 of file DC939A.ino.

## ◆ print_prompt()

static void print_prompt | ( |  | ) |
| static

Prints main menu.

Definition at line 219 of file DC939A.ino.

## ◆ print_title()

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

Prints the title block when program first starts.

Definition at line 203 of file DC939A.ino.

## ◆ restore_calibration()

static int8_t restore_calibration | ( |  | ) |
| static

Read stored calibration parameters from nonvolatile EEPROM on demo board.

Returns
  0 if successful, 1 if failure

Definition at line 260 of file DC939A.ino.

## ◆ setup()

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

Initialize Linduino.

Definition at line 139 of file DC939A.ino.

## ◆ store_calibration()

static void store_calibration | ( |  | ) |
| static

Store measured calibration parameters to nonvolatile EEPROM on demo board.

Definition at line 284 of file DC939A.ino.

## Macro Definition Documentation

## ◆ REJECTION50

#define REJECTION50 1

50Hz rejection

Definition at line 109 of file DC939A.ino.

## ◆ REJECTION50_60

#define REJECTION50_60 0

50-60Hz rejection

Definition at line 108 of file DC939A.ino.

## ◆ REJECTION60

#define REJECTION60 2

60Hz rejection

Definition at line 110 of file DC939A.ino.

## Variable Documentation

## ◆ adc_2x

int8_t adc_2x = 0
| static

The LTC2484 2x speed mode.

Definition at line 128 of file DC939A.ino.

## ◆ adc_rejection

int8_t adc_rejection = REJECTION50_60
| static

The LTC2484 rejection.

Definition at line 127 of file DC939A.ino.

## ◆ demo_board_connected

uint8_t demo_board_connected
| static

Set to 1 if the board is connected.

Definition at line 126 of file DC939A.ino.

## ◆ LTC2484_lsb

float LTC2484_lsb = 9.3132258E-9
| static

Ideal LSB size, 5V/(2^29) for a 5V reference.

Definition at line 131 of file DC939A.ino.

## ◆ LTC2484_offset_code

int32_t LTC2484_offset_code = 0
| static

Ideal offset.

Definition at line 132 of file DC939A.ino.

## ◆ LTC2484_r0

float LTC2484_r0 = 45.097156E6
| static

ADC code at the nominal temperature (420mV default)

Definition at line 134 of file DC939A.ino.

## ◆ LTC2484_t0

float LTC2484_t0 = 27.0
| static

Nominal temperature.

Definition at line 133 of file DC939A.ino.

## ◆ MISO_TIMEOUT

const uint16_t MISO_TIMEOUT = 1000

The MISO timeout (ms)

Definition at line 136 of file DC939A.ino.