Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Linear Technology DC998A Demonstration Board. More...

Detailed Description

Linear Technology DC998A Demonstration Board.

LTC4261: Negative Voltage Hot Swap Controllers with ADC and I2C Monitoring.

NOTES
  Setup:
   Set the terminal baud rate to 115200 and select the newline terminator. Provide
   the board with an external power supply of -48 V. Ensure all jumpers on the
   demo board are installed in their default positions from the factory. Refer to
   Demo Manual DC998A.

   This program has options to measure voltage at ADIN pin (input voltage), SOURCE
   VOLTAGE (output voltage), and SENSE CURRENT (current through sense resisitor).
   There are also options to read and manipulate CONTROL register, ALERT register,
   and FAULT register.

   Mass write option can be achieved using Device Address = 0xBE. Refer to datasheet
   LTC4261.

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

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

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

Go to the source code of this file.

Functions

static void print_title ()
 Print the title block. More...
 
static void print_main_menu ()
 Print the main menu. More...
 
static int8_t main_menu_1_continuous_mode ()
 Function to read Rsense current, ADIN voltage and ADIN2 voltage in continous mode. More...
 
static int8_t main_menu_2_read_and_clear_faults ()
 Function to read and clear fault register. More...
 
static int8_t main_menu_3_send_ARA ()
 Function to send alert response (0001100) and read back the address of device that pulled ALERT pin low. More...
 
static int8_t main_menu_4_manage_alerts ()
 Function to update alert register bits. More...
 
static int8_t main_menu_5_settings ()
 Function to update control register bits. More...
 
static int8_t main_menu_6_read_all_registers ()
 Function to read all registers. More...
 
static void setup ()
 Initialize Linduino. More...
 
static void loop ()
 Repeats Linduino loop. More...
 

Variables

const float resistor = .008
 
const float current_lsb = 62.5E-06
 
const float adin_lsb = 2.56/1023
 
const float resistive_ratio = 432.2 / 10.2
 
static int8_t demo_board_connected
 Set to 1 if the board is connected. More...
 
const char ack_error [] = "Error: No Acknowledge. Check I2C Address."
 Error message. More...
 

Function Documentation

◆ loop()

static void loop ( void  )
static

Repeats Linduino loop.

Definition at line 119 of file DC998A.ino.

◆ main_menu_1_continuous_mode()

static int8_t main_menu_1_continuous_mode ( )
static

Function to read Rsense current, ADIN voltage and ADIN2 voltage in continous mode.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 192 of file DC998A.ino.

◆ main_menu_2_read_and_clear_faults()

static int8_t main_menu_2_read_and_clear_faults ( )
static

Function to read and clear fault register.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 257 of file DC998A.ino.

◆ main_menu_3_send_ARA()

static int8_t main_menu_3_send_ARA ( )
static

Function to send alert response (0001100) and read back the address of device that pulled ALERT pin low.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 290 of file DC998A.ino.

◆ main_menu_4_manage_alerts()

static int8_t main_menu_4_manage_alerts ( )
static

Function to update alert register bits.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 307 of file DC998A.ino.

◆ main_menu_5_settings()

static int8_t main_menu_5_settings ( )
static

Function to update control register bits.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 485 of file DC998A.ino.

◆ main_menu_6_read_all_registers()

static int8_t main_menu_6_read_all_registers ( )
static

Function to read all registers.

Returns
Returns the state of the acknowledge bit after the I2C address read. 0=acknowledge, 1=no acknowledge.

Definition at line 660 of file DC998A.ino.

◆ print_main_menu()

static void print_main_menu ( )
static

Print the main menu.

Definition at line 179 of file DC998A.ino.

◆ print_title()

static void print_title ( void  )
static

Print the title block.

Definition at line 165 of file DC998A.ino.

◆ setup()

static void setup ( void  )
static

Initialize Linduino.

Definition at line 107 of file DC998A.ino.

Variable Documentation

◆ ack_error

const char ack_error[] = "Error: No Acknowledge. Check I2C Address."

Error message.

Definition at line 104 of file DC998A.ino.

◆ adin_lsb

const float adin_lsb = 2.56/1023

Definition at line 99 of file DC998A.ino.

◆ current_lsb

const float current_lsb = 62.5E-06

Definition at line 98 of file DC998A.ino.

◆ demo_board_connected

int8_t demo_board_connected
static

Set to 1 if the board is connected.

Definition at line 102 of file DC998A.ino.

◆ resistive_ratio

const float resistive_ratio = 432.2 / 10.2

Definition at line 100 of file DC998A.ino.

◆ resistor

const float resistor = .008

Definition at line 97 of file DC998A.ino.