![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
LTC2992: Dual Wide Range Power Monitor. More...
LTC2992: Dual Wide Range Power Monitor.
Setting the Thresholds: 1. Select the Threshold Configuration from the main menu. 2. Select the desired Threshold to be changed. Then enter the minimum and maximum values. 3. If any reading exceeds the set threshold, a fault will be generated that can be viewed in the Read/Clear Faults Menu Reading and Clearing a Fault: 1. Select the Read/Clear Fault option from the main menu. 2. To read all the faults, select Read Faults option. This will display all the faults that have occured. 3. To clear all faults, go back to the Read/Clear Faults menu and select Clear Faults option. NOTE: Due to memory limitations of the Atmega328 processor this sketch shows limited functionality of the LTC2992. Please check the datasheet for a picture of the full functionality of the LTC2992. NOTES Setup: Set the terminal baud rate to 115200 and select the newline terminator. Requires a power supply. Refer to demo manual DC2561A. USER INPUT DATA FORMAT: decimal : 1024 hex : 0x400 octal : 02000 (leGPIOg 0 "zero") binary : B10000000000 float : 1024.0
http://www.linear.com/product/LTC2992
http://www.linear.com/product/LTC2992#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:
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 DC2561.ino.
Go to the source code of this file.
Functions | |
static void | print_title () |
Print the title block. More... | |
static void | print_prompt () |
Print the Prompt. More... | |
static int8_t | menu_1_continuous_mode (int8_t CTRLA_mode, int8_t bit_resolution, float scale) |
Continuous Mode. More... | |
static int8_t | menu_2_threshold_config (float scale, int8_t bit_resolution) |
Configure Threshold Values. More... | |
static int8_t | menu_3_GPIO_config () |
static int8_t | menu_4_settings (int8_t *CTRLA_mode, int8_t *bit_resolution) |
Settings to configure shutdown mode and ADC Resolution. More... | |
static int8_t | menu_5_read_clear_faults () |
Read/Clear Faults. More... | |
static int8_t | menu_2_threshold_menu_1_set_power (int8_t bit_resolution) |
Set Power Min/Max Values. More... | |
static int8_t | menu_2_threshold_menu_2_set_current (int8_t bit_resolution) |
Set Min/Max Current Threshold. More... | |
static int8_t | menu_2_threshold_menu_3_set_SENSE (int8_t bit_resolution) |
Set Min/Max Voltage Thresholds. More... | |
static int8_t | menu_2_alert_menu_4_set_adin_alerts (float scale, int8_t bit_resolution) |
static int8_t | menu_2_threshold_menu_5_reset_thresholds () |
Set All Thresholds to Default Values. More... | |
static void | setup () |
Initialize Linduino. More... | |
static void | loop () |
Repeats Linduino loop. More... | |
Macros | |
#define | CONTINUOUS_MODE_DISPLAY_DELAY 1000 |
The delay between readings in continious mode. More... | |
Variables | |
const float | LTC2992_GPIO_8bit_lsb = 8.000E-3 |
Typical GPIO lsb weight for 8-bit mode in volts. More... | |
const float | LTC2992_GPIO_12bit_lsb = 0.500E-3 |
Typical GPIO lsb weight for 12-bit mode in volts. More... | |
const float | LTC2992_DELTA_SENSE_8bit_lsb = 200.00E-6 |
Typical Delta lsb weight for 8-bit mode in volts. More... | |
const float | LTC2992_DELTA_SENSE_12bit_lsb = 12.50E-6 |
Typical Delta lsb weight for 12-bit mode in volts. More... | |
const float | LTC2992_SENSE_8bit_lsb = 400.00E-3 |
Typical SENSE lsb weight for 8-bit mode in volts. More... | |
const float | LTC2992_SENSE_12bit_lsb = 25.00E-3 |
Typical SENSE lsb weight for 12-bit mode in volts. More... | |
const float | LTC2992_Power_8bit_lsb = LTC2992_DELTA_SENSE_8bit_lsb*LTC2992_SENSE_8bit_lsb |
Typical POWER lsb weight for 8-bit mode in V^2. More... | |
const float | LTC2992_Power_12bit_lsb = LTC2992_DELTA_SENSE_12bit_lsb*LTC2992_SENSE_12bit_lsb |
Typical POWER lsb weight for 12-bit mode in V^2. More... | |
const float | resistor = .01 |
resistor value on demo board More... | |
const char | ack_error [] = "Error: No Acknowledge. Check I2C Address." |
Error message. More... | |
static int8_t | demo_board_connected |
Set to 1 if the board is connected. More... | |
|
static |
Repeats Linduino loop.
Definition at line 152 of file DC2561.ino.
|
static |
Continuous Mode.
CTRLA_mode | Set Continious Mode |
bit_resolution | Set ADC Resolution |
scale | Stores division ratio for resistive divider on GPIO pin. Configured inside "Settings" menu. |
Definition at line 232 of file DC2561.ino.
|
static |
scale | Stores division ratio for resistive divider on GPIO pin. Configured inside "Settings" menu. |
bit_resolution | Sets ADC Resolution |
Definition at line 1080 of file DC2561.ino.
|
static |
Configure Threshold Values.
scale | Stores division ratio for resistive divider on GPIO pin. Configured inside "Settings" menu. |
bit_resolution | Sets ADC Resolution |
Definition at line 731 of file DC2561.ino.
|
static |
Set Power Min/Max Values.
bit_resolution | Sets ADC Resolution |
Definition at line 785 of file DC2561.ino.
|
static |
Set Min/Max Current Threshold.
bit_resolution | Sets ADC Resolution |
Definition at line 894 of file DC2561.ino.
|
static |
Set Min/Max Voltage Thresholds.
Definition at line 1004 of file DC2561.ino.
|
static |
Set All Thresholds to Default Values.
Definition at line 1221 of file DC2561.ino.
|
static |
Definition at line 1284 of file DC2561.ino.
|
static |
Settings to configure shutdown mode and ADC Resolution.
Sets ADC Bit Resolution.
bit_resolution | CTRLA Register. Used to set device in Shutdown |
Definition at line 1585 of file DC2561.ino.
|
static |
Read/Clear Faults.
Definition at line 1402 of file DC2561.ino.
|
static |
Print the Prompt.
Definition at line 221 of file DC2561.ino.
|
static |
Print the title block.
Definition at line 208 of file DC2561.ino.
|
static |
Initialize Linduino.
Definition at line 130 of file DC2561.ino.
#define CONTINUOUS_MODE_DISPLAY_DELAY 1000 |
The delay between readings in continious mode.
Definition at line 108 of file DC2561.ino.
const char ack_error[] = "Error: No Acknowledge. Check I2C Address." |
Error message.
Definition at line 123 of file DC2561.ino.
|
static |
Set to 1 if the board is connected.
Definition at line 126 of file DC2561.ino.
const float LTC2992_DELTA_SENSE_12bit_lsb = 12.50E-6 |
Typical Delta lsb weight for 12-bit mode in volts.
Definition at line 114 of file DC2561.ino.
const float LTC2992_DELTA_SENSE_8bit_lsb = 200.00E-6 |
Typical Delta lsb weight for 8-bit mode in volts.
Definition at line 113 of file DC2561.ino.
const float LTC2992_GPIO_12bit_lsb = 0.500E-3 |
Typical GPIO lsb weight for 12-bit mode in volts.
Definition at line 112 of file DC2561.ino.
const float LTC2992_GPIO_8bit_lsb = 8.000E-3 |
Typical GPIO lsb weight for 8-bit mode in volts.
Definition at line 111 of file DC2561.ino.
const float LTC2992_Power_12bit_lsb = LTC2992_DELTA_SENSE_12bit_lsb*LTC2992_SENSE_12bit_lsb |
Typical POWER lsb weight for 12-bit mode in V^2.
Definition at line 118 of file DC2561.ino.
const float LTC2992_Power_8bit_lsb = LTC2992_DELTA_SENSE_8bit_lsb*LTC2992_SENSE_8bit_lsb |
Typical POWER lsb weight for 8-bit mode in V^2.
Definition at line 117 of file DC2561.ino.
const float LTC2992_SENSE_12bit_lsb = 25.00E-3 |
Typical SENSE lsb weight for 12-bit mode in volts.
Definition at line 116 of file DC2561.ino.
const float LTC2992_SENSE_8bit_lsb = 400.00E-3 |
Typical SENSE lsb weight for 8-bit mode in volts.
Definition at line 115 of file DC2561.ino.
const float resistor = .01 |
resistor value on demo board
Definition at line 120 of file DC2561.ino.