![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
DC1697A LTC2945: Wide Range Power Monitor. More...
DC1697A LTC2945: Wide Range Power Monitor.
Setting the Alerts: 1. Select the Alert option from the main menu. 2. Select the desired alerts to be changed. Then enter the minimum and maximum values. 3. Select the Enable and Disable Alert Option and Enable the desired alerts. 4. Lastly, go back to the main menu and start reading values in Continuous Mode or Snapshot Mode. Note: Alerts only respond when conversion is done. Therefore, in continuous mode the alerts will constantly be updated. Reading and Clearing an Alert: 1. Select the Alert option from the main menu. 2. Select the Read and Clear Alerts option. This reads all faults that occured and clears the alerts. NOTES Setup: Set the terminal baud rate to 115200 and select the newline terminator. Requires a power supply. Refer to demo manual DC1697A. USER INPUT DATA FORMAT: decimal : 1024 hex : 0x400 octal : 02000 (leading 0 "zero") binary : B10000000000 float : 1024.0
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 DC1697A.ino.
Go to the source code of this file.
Data Structures | |
union | eeprom_data_union |
Used to manipulate EEPROM data. More... | |
struct | eeprom_data_union::data_struct_type |
EEPROM data structure. More... | |
Functions | |
static void | print_title () |
Print the title block. More... | |
static void | print_prompt () |
Print the Prompt. More... | |
static void | store_alert_settings () |
Store the alert settings to the EEPROM. More... | |
static int8_t | restore_alert_settings () |
Read the alert settings from EEPROM. More... | |
static int8_t | menu_1_continuous_mode (int8_t VDD_or_SENSE_monitoring, int8_t ADIN_or_SENSE, float scale) |
Continuous Mode. More... | |
static int8_t | menu_2_snapshot_mode (int8_t VDD_or_SENSE_monitoring, int8_t ADIN_or_SENSE) |
Snapshot Mode Menu. More... | |
static int8_t | menu_2_snapshot_mode_menu_1_current (int8_t VDD_or_SENSE_monitoring, int8_t ADIN_or_SENSE) |
Current - Snapshot mode. More... | |
static int8_t | menu_2_snapshot_mode_menu_2_vin () |
VIN - Snapshot Mode. More... | |
static int8_t | menu_2_snapshot_mode_menu_3_ADIN () |
ADIN - Snapshot Mode. More... | |
static int8_t | menu_3_alert (int8_t ADIN_or_SENSE) |
Alert Menu. More... | |
static int8_t | menu_3_alert_menu_1_set_power_alerts (int8_t ADIN_or_SENSE) |
Set Power Alerts. More... | |
static int8_t | menu_3_alert_menu_2_set_current_alerts () |
Set Current Alerts. More... | |
static int8_t | menu_3_alert_menu_3_set_vin_alerts () |
Set VIN Alerts. More... | |
static int8_t | menu_3_alert_menu_4_set_adin_alerts () |
Set ADIN Alerts. More... | |
static int8_t | menu_3_alert_menu_5_enable_disable_alerts () |
Enable/Disable Alerts. More... | |
static int8_t | menu_3_alert_menu_6_read_clear_alerts () |
Read Alerts and Clear Alerts. More... | |
static int8_t | menu_4_shutdown () |
Shutdown Down Mode. More... | |
static void | menu_5_settings (int8_t *VDD_or_SENSE_monitoring, int8_t *ADIN_or_SENSE, float *scale) |
change Settings More... | |
static int8_t | menu_6_clear_min_max () |
Clear Min/Max. 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. More... | |
Variables | |
const float | LTC2945_ADIN_lsb = 5.001221E-04 |
Typical ADIN lsb weight in volts. More... | |
const float | LTC2945_DELTA_SENSE_lsb = 2.5006105E-05 |
Typical Delta lsb weight in volts. More... | |
const float | LTC2945_VIN_lsb = 2.5006105E-02 |
Typical VIN lsb weight in volts. More... | |
const float | LTC2945_Power_lsb = 6.25305E-07 |
Typical POWER lsb weight in V^2. More... | |
const float | LTC2945_ADIN_DELTA_SENSE_lsb = 1.25061E-08 |
Typical sense lsb weight in V^2 *ADIN_lsb * DELTA_SENSE_lsb. More... | |
const float | resistor = .02 |
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 uint8_t | alert_code = 0 |
Value stored or read from ALERT register. More... | |
|
static |
Repeats Linduino loop.
Definition at line 150 of file DC1697A.ino.
|
static |
Continuous Mode.
VDD_or_SENSE_monitoring | Choose whether VIN is sensed at VDD pin or SENSE pin (A2 bit of CONTROL Register A) |
ADIN_or_SENSE | Choose whether power multiplier uses ADIN pin or SENSE pin as voltage input (A0 bit in CONTROL Register A) |
scale | Stores division ratio for resistive divider on ADIN pin. Configured inside "Settings" menu. |
Definition at line 234 of file DC1697A.ino.
|
static |
Snapshot Mode Menu.
VDD_or_SENSE_monitoring | Choose whether VIN is sensed at VDD pin or SENSE pin (A2 bit of CONTROL Register A) |
ADIN_or_SENSE | Choose whether power multiplier uses ADIN pin or SENSE pin as voltage input (A0 bit in CONTROL Register A) |
Definition at line 381 of file DC1697A.ino.
|
static |
Current - Snapshot mode.
VDD_or_SENSE_monitoring | Choose whether VIN is sensed at VDD pin or SENSE pin (A2 bit of CONTROL Register A) |
ADIN_or_SENSE | Choose whether power multiplier uses ADIN pin or SENSE pin as voltage input (A0 bit in CONTROL Register A) |
Definition at line 440 of file DC1697A.ino.
|
static |
VIN - Snapshot Mode.
Definition at line 470 of file DC1697A.ino.
|
static |
ADIN - Snapshot Mode.
Definition at line 495 of file DC1697A.ino.
|
static |
Alert Menu.
ADIN_or_SENSE | Choose whether power multiplier uses ADIN pin or SENSE pin as voltage input (A0 bit in CONTROL Register A) |
Definition at line 521 of file DC1697A.ino.
|
static |
Set Power Alerts.
ADIN_or_SENSE | Choose whether power multiplier uses ADIN pin or SENSE pin as voltage input (A0 bit in CONTROL Register A) |
Definition at line 586 of file DC1697A.ino.
|
static |
Set Current Alerts.
Definition at line 620 of file DC1697A.ino.
|
static |
Set VIN Alerts.
Definition at line 648 of file DC1697A.ino.
|
static |
Set ADIN Alerts.
Definition at line 675 of file DC1697A.ino.
|
static |
Enable/Disable Alerts.
Definition at line 702 of file DC1697A.ino.
|
static |
Read Alerts and Clear Alerts.
Definition at line 827 of file DC1697A.ino.
|
static |
Shutdown Down Mode.
Definition at line 845 of file DC1697A.ino.
|
static |
change Settings
VDD_or_SENSE_monitoring | Choose whether VIN is sensed at VDD pin or SENSE pin (A2 bit of CONTROL Register A) |
ADIN_or_SENSE | Choose whether power multiplier uses ADIN pin or SENSE pin as voltage input (A0 bit in CONTROL Register A) |
scale | Stores division ratio for resistive divider on ADIN pin. |
Definition at line 856 of file DC1697A.ino.
|
static |
Clear Min/Max.
Definition at line 886 of file DC1697A.ino.
|
static |
Print the Prompt.
Definition at line 222 of file DC1697A.ino.
|
static |
Print the title block.
Definition at line 209 of file DC1697A.ino.
|
static |
Read the alert settings from EEPROM.
Definition at line 924 of file DC1697A.ino.
|
static |
Initialize Linduino.
Definition at line 128 of file DC1697A.ino.
|
static |
Store the alert settings to the EEPROM.
Definition at line 962 of file DC1697A.ino.
#define CONTINUOUS_MODE_DISPLAY_DELAY 1000 |
The delay between readings.
Definition at line 109 of file DC1697A.ino.
const char ack_error[] = "Error: No Acknowledge. Check I2C Address." |
Error message.
Definition at line 121 of file DC1697A.ino.
|
static |
Value stored or read from ALERT register.
Shared between loop() and restore_alert_settings()
Definition at line 125 of file DC1697A.ino.
|
static |
Set to 1 if the board is connected.
Definition at line 124 of file DC1697A.ino.
const float LTC2945_ADIN_DELTA_SENSE_lsb = 1.25061E-08 |
Typical sense lsb weight in V^2 *ADIN_lsb * DELTA_SENSE_lsb.
Definition at line 116 of file DC1697A.ino.
const float LTC2945_ADIN_lsb = 5.001221E-04 |
Typical ADIN lsb weight in volts.
Definition at line 112 of file DC1697A.ino.
const float LTC2945_DELTA_SENSE_lsb = 2.5006105E-05 |
Typical Delta lsb weight in volts.
Definition at line 113 of file DC1697A.ino.
const float LTC2945_Power_lsb = 6.25305E-07 |
Typical POWER lsb weight in V^2.
Definition at line 115 of file DC1697A.ino.
const float LTC2945_VIN_lsb = 2.5006105E-02 |
Typical VIN lsb weight in volts.
Definition at line 114 of file DC1697A.ino.
const float resistor = .02 |
resistor value on demo board
Definition at line 118 of file DC1697A.ino.