Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board
DC2155A.ino File Reference

Linear Technology DC2155A Demonstartion Board LTC3886: Power Management Solution for Application Processors. More...

Detailed Description

Linear Technology DC2155A Demonstartion Board LTC3886: Power Management Solution for Application Processors.

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

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

http://www.linear.com/product/LTC3886#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 DC2155A.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 ()
 Prints the title block when program first starts. More...
 
static void print_prompt ()
 Prints main menu. More...
 
static void print_comp_config ()
 Prints current compensation configuration and saves ith, gm, and configuration hex values. More...
 
static float ith_nearest_legal_value (float ith)
 Rounds decimal input ith to nearest legal decimal value. More...
 
static float gm_nearest_legal_value (float gm)
 Rounds decimal input gm to nearest legal decimal value. More...
 
static float ith_hex2decimal (uint8_t ith)
 Converts ith demo circuit hex value to its decimal equivalent. More...
 
static float gm_hex2decimal (uint8_t gm)
 Converts gm demo circuit hex value to its decimal equivalent. More...
 
static uint8_t ith_decimal2hex (float ith)
 Converts ith decimal value to the demo circuit hex equivalent. More...
 
static uint8_t gm_decimal2hex (float gm)
 Converts gm decimal value to the demo circuit hex equivalent. More...
 

Macros

#define LTC3886_I2C_ADDRESS   0x4F
 
#define MFR_PWM_COMP   0xD3
 
#define PAGE   0x00
 
#define CH_0   0x00
 
#define CH_1   0x01
 
#define ITH_MAX   62
 
#define GM_MAX   5.73
 

Variables

static uint8_t ltc3886_i2c_address
 
static LT_SMBusNoPecsmbus = new LT_SMBusNoPec()
 
static uint8_t channel
 
static uint8_t ith
 
static uint8_t gm
 
static uint8_t comp_config
 
static float ith_dec
 
static float gm_dec
 
static float ith_vals [] = {0, .25, .5, .75, 1, 1.25, 1.5, 1.75, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 7, 8, 9, 11, 13, 15, 17, 20, 24, 28, 32, 38, 46, 54, 62}
 
static float gm_vals [] = {1, 1.68, 2.35, 3.02, 3.69, 4.36, 5.04, 5.73}
 
static uint8_t ith_vals_hex [] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}
 
static uint8_t gm_vals_hex [] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}
 

Function Documentation

◆ gm_decimal2hex()

static uint8_t gm_decimal2hex ( float  gm)
static

Converts gm decimal value to the demo circuit hex equivalent.

Returns
uint8_t

Definition at line 283 of file DC2155A.ino.

◆ gm_hex2decimal()

static float gm_hex2decimal ( uint8_t  gm)
static

Converts gm demo circuit hex value to its decimal equivalent.

Returns
double

Definition at line 257 of file DC2155A.ino.

◆ gm_nearest_legal_value()

static float gm_nearest_legal_value ( float  gm)
static

Rounds decimal input gm to nearest legal decimal value.

Returns
double

Definition at line 229 of file DC2155A.ino.

◆ ith_decimal2hex()

static uint8_t ith_decimal2hex ( float  ith)
static

Converts ith decimal value to the demo circuit hex equivalent.

Returns
uint8_t

Definition at line 270 of file DC2155A.ino.

◆ ith_hex2decimal()

static float ith_hex2decimal ( uint8_t  ith)
static

Converts ith demo circuit hex value to its decimal equivalent.

Returns
double

Definition at line 244 of file DC2155A.ino.

◆ ith_nearest_legal_value()

static float ith_nearest_legal_value ( float  ith)
static

Rounds decimal input ith to nearest legal decimal value.

Returns
double

Definition at line 214 of file DC2155A.ino.

◆ loop()

static void loop ( void  )
static

Repeats Linduino loop.

Definition at line 111 of file DC2155A.ino.

◆ print_comp_config()

static void print_comp_config ( )
static

Prints current compensation configuration and saves ith, gm, and configuration hex values.

Returns
void

Definition at line 192 of file DC2155A.ino.

◆ print_prompt()

static void print_prompt ( )
static

Prints main menu.

Returns
void

Definition at line 183 of file DC2155A.ino.

◆ print_title()

static void print_title ( void  )
static

Prints the title block when program first starts.

Returns
void

Definition at line 171 of file DC2155A.ino.

◆ setup()

static void setup ( void  )
static

Initialize Linduino.

Definition at line 100 of file DC2155A.ino.

Macro Definition Documentation

◆ CH_0

#define CH_0   0x00

Definition at line 74 of file DC2155A.ino.

◆ CH_1

#define CH_1   0x01

Definition at line 75 of file DC2155A.ino.

◆ GM_MAX

#define GM_MAX   5.73

Definition at line 78 of file DC2155A.ino.

◆ ITH_MAX

#define ITH_MAX   62

Definition at line 77 of file DC2155A.ino.

◆ LTC3886_I2C_ADDRESS

#define LTC3886_I2C_ADDRESS   0x4F

Definition at line 71 of file DC2155A.ino.

◆ MFR_PWM_COMP

#define MFR_PWM_COMP   0xD3

Definition at line 72 of file DC2155A.ino.

◆ PAGE

#define PAGE   0x00

Definition at line 73 of file DC2155A.ino.

Variable Documentation

◆ channel

uint8_t channel
static

Definition at line 85 of file DC2155A.ino.

◆ comp_config

uint8_t comp_config
static

Definition at line 88 of file DC2155A.ino.

◆ gm

uint8_t gm
static

Definition at line 87 of file DC2155A.ino.

◆ gm_dec

float gm_dec
static

Definition at line 90 of file DC2155A.ino.

◆ gm_vals

float gm_vals[] = {1, 1.68, 2.35, 3.02, 3.69, 4.36, 5.04, 5.73}
static

Definition at line 94 of file DC2155A.ino.

◆ gm_vals_hex

uint8_t gm_vals_hex[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}
static

Definition at line 96 of file DC2155A.ino.

◆ ith

uint8_t ith
static

Definition at line 86 of file DC2155A.ino.

◆ ith_dec

float ith_dec
static

Definition at line 89 of file DC2155A.ino.

◆ ith_vals

float ith_vals[] = {0, .25, .5, .75, 1, 1.25, 1.5, 1.75, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 7, 8, 9, 11, 13, 15, 17, 20, 24, 28, 32, 38, 46, 54, 62}
static

Definition at line 93 of file DC2155A.ino.

◆ ith_vals_hex

uint8_t ith_vals_hex[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}
static

Definition at line 95 of file DC2155A.ino.

◆ ltc3886_i2c_address

uint8_t ltc3886_i2c_address
static

Definition at line 82 of file DC2155A.ino.

◆ smbus

LT_SMBusNoPec* smbus = new LT_SMBusNoPec()
static

Definition at line 83 of file DC2155A.ino.