| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Variables
DC2334A.ino File Reference
Power Monitors and Coulomb Counters » LTC2947 a high-precision power and energy monitor with an internal sense resistor supporting up to 30A.

## Detailed Description

    Linear Technology DC2334A Demonstration Board.
    LTC2947: LTC2947 a high-precision power and energy monitor
    with an internal sense resistor supporting up to 30A.

    The LTC2947 is a high-precision power and energy
    monitor with an internal sense resistor supporting up
    to 30A. Three internal No Latency delta sigma ADCs ensure
    accurate measurement of voltage and current, while high-
    bandwidth analog multiplication of voltage and current
    provides accurate power measurement in a wide range of
    applications. Internal or external clocking options enable
    precise charge and energy measurements.
    An internal 300 micro ohms, temperature-compensated sense
    resistor minimizes efficiency loss and external compo-
    nents, simplifying energy measurement applications while
    enabling high accuracy current measurement over the full
    temperature range. For more details see following URLs:

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

    NOTES
    Setup:
    Set the terminal baud rate to 115200 and select the newline terminator.

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

    See the DC2334 demo manual and LTC2947 datasheet  for  more  details on
    operation.

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 DC2334A.ino.

Go to the source code of this file.

## Functions
static void | setup ()
| Initialize Linduino. More...
static void | loop ()
| Repeats Linduino loop. More...
static void | print_title ()
| Print the title block. More...
static void | print_main_menu ()
| Print the main menu. More...
static void | mm1_operation_control ()
| LTC2947's operation control menu. More...
static void | mm2_read_status_alert_registers ()
| Read and print all status / alert registers. More...
static void | mm3_measurements ()
| Read measurement results. More...
static void | mm4_accu_measurements ()
| Read accumulated measurement results. More...
static void | mm5_accu_init ()
| Initialize accumulators with user defined values. More...
static void | mm6_min_max ()
| Read tracking (min/max) measurement values. More...
static void | mm7_gpio_ctrl ()
| LTC2947's GPIO control menu. More...
static void | mm8_ara ()
| SMBus Alert Response Protocol. More...
static void | print_min_max (float min, float max, uint8_t digits, byte *minBytes, byte *maxBytes)
| prints two (min/max) values with label including the 16 bit raw values More...
static void | go_idle_cfg_tbctl ()
| put LTC2947 into idle mode and configure TBCTL More...
static void | parse_status_alert_regs (uint8_t statusRegs[8], uint8_t register_num)
| parse status and alert registers. More...
static void | setup_ser_mode ()
| Setup LTC2947's serial interface mode. More...

## Variables
static uint8_t | demo_board_connected
| Global variables. More...

## Function Documentation

## ◆ go_idle_cfg_tbctl()

static void go_idle_cfg_tbctl | ( |  | ) |
| static

put LTC2947 into idle mode and configure TBCTL

Definition at line 596 of file DC2334A.ino.

## ◆ loop()

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

Repeats Linduino loop.

Definition at line 122 of file DC2334A.ino.

## ◆ mm1_operation_control()

static void mm1_operation_control | ( |  | ) |
| static

LTC2947's operation control menu.

Definition at line 203 of file DC2334A.ino.

## ◆ mm2_read_status_alert_registers()

static void mm2_read_status_alert_registers | ( |  | ) |
| static

Read and print all status / alert registers.

Definition at line 281 of file DC2334A.ino.

## ◆ mm3_measurements()

static void mm3_measurements | ( |  | ) |
| static

Read measurement results.

Definition at line 291 of file DC2334A.ino.

## ◆ mm4_accu_measurements()

static void mm4_accu_measurements | ( |  | ) |
| static

Read accumulated measurement results.

Definition at line 318 of file DC2334A.ino.

## ◆ mm5_accu_init()

static void mm5_accu_init | ( |  | ) |
| static

Initialize accumulators with user defined values.

Definition at line 347 of file DC2334A.ino.

## ◆ mm6_min_max()

static void mm6_min_max | ( |  | ) |
| static

Read tracking (min/max) measurement values.

Definition at line 457 of file DC2334A.ino.

## ◆ mm7_gpio_ctrl()

static void mm7_gpio_ctrl | ( |  | ) |
| static

LTC2947's GPIO control menu.

Definition at line 494 of file DC2334A.ino.

## ◆ mm8_ara()

static void mm8_ara | ( |  | ) |
| static

SMBus Alert Response Protocol.

Definition at line 545 of file DC2334A.ino.

## ◆ parse_status_alert_regs()

static void parse_status_alert_regs | ( | uint8_t | statusRegs[8],
|  | uint8_t | register_num
| ) |  |
| static

parse status and alert registers.

register_num (0..7) selects one of the 8 status/alert registers statusRegs is a 8-byte array that holds the content of the status/alert registers read from the device

Definition at line 635 of file DC2334A.ino.

## ◆ print_main_menu()

static void print_main_menu | ( |  | ) |
| static

Print the main menu.

Definition at line 183 of file DC2334A.ino.

## ◆ print_min_max()

static void print_min_max | ( | float | min,
|  | float | max,
|  | uint8_t | digits,
|  | byte * | minBytes,
|  | byte * | maxBytes
| ) |  |
| static

prints two (min/max) values with label including the 16 bit raw values

Definition at line 576 of file DC2334A.ino.

## ◆ print_title()

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

Print the title block.

Definition at line 169 of file DC2334A.ino.

## ◆ setup()

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

Initialize Linduino.

Definition at line 96 of file DC2334A.ino.

## ◆ setup_ser_mode()

static void setup_ser_mode | ( |  | ) |
| static

Setup LTC2947's serial interface mode.

Definition at line 741 of file DC2334A.ino.

## Variable Documentation

## ◆ demo_board_connected

uint8_t demo_board_connected
| static

Global variables.

Set to 1 if the board is connected

Definition at line 93 of file DC2334A.ino.