![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Linear Technology DC2024A Demonstration Board. More...
Linear Technology DC2024A Demonstration Board.
LTC4282: High Current Hotswap Controller with I2C Compatible Monitoring
Setting the Alarm Thresholds: 1. Select the Alarm option from the main menu. 2. Then enter the minimum and maximum values. 3. Once you are done, the new settings will be uploaded to the Device. 4. Lastly, go back to the main menu and start reading values in Continuous Mode Note: Alerts only respond when conversion is done. Therefore, in continuous mode the alerts will constantly be updated. Reading and Clearing Alarm Faults: 1. Select the View/Clear option from the main menu. 2. Select the Clear Faults option. This will clear all faults. NOTES Setup: Set the terminal baud rate to 115200 and select the newline terminator. Requires a power supply. Refer to demo manual DC2024. USER INPUT DATA FORMAT: decimal : 1024 hex : 0x400 octal : 02000 (leading 0 "zero") binary : B10000000000 float : 1024.0
http://www.linear.com/product/LTC4282
http://www.linear.com/product/LTC4282#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 DC2024A.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 (uint8_t CTRLREG_LSB, uint8_t ILIM_ADJUST, uint8_t CLK_DECIMATOR, float resistor) |
Continious Mode. More... | |
static int8_t | menu_2_alarm_thresholds (uint8_t CTRLREG_LSB) |
Continuous Mode Measurement. More... | |
static int8_t | menu_3_view_clear_faults () |
Set Alarm Thresholds. More... | |
static int8_t | menu_3_view_faults_menu_1 () |
View/Clear Faults. More... | |
static int8_t | menu_3_clear_faults_menu_2 () |
View Faults. More... | |
static int8_t | menu_4_set_alert_registers () |
Clear Faults. More... | |
static int8_t | menu_4_set_alert_msb_register_menu_1 () |
Set Alert Registers. More... | |
static int8_t | menu_4_set_alert_lsb_register_menu_2 () |
Set Alert MSB Register. More... | |
static int8_t | menu_5_settings (uint8_t *CTRLREG_MSB, uint8_t *CTRLREG_LSB, uint8_t *ILIM_ADJUST, uint8_t *CLK_DECIMATOR) |
Set Alert LSB Register. More... | |
static int8_t | menu_5_set_control_msb_register_menu_1 (uint8_t *CTRLREG_MSB) |
Settings. More... | |
static int8_t | menu_5_set_control_lsb_register_menu_2 (uint8_t *CTRLREG_LSB) |
Control MSB Register Menu. Configure OV/UV/OC Autoretry, FET ON, Mass Write Enable, ON/ENB, ON DELAY and ON FAULT MASK. More... | |
static uint8_t | menu_5_set_ilim_adjust_register_menu_3 (uint8_t *ILIM_ADJUST) |
Control LSB Register Menu. Configure Thresholds for POWER GOOD/OV/UV as well as for VIN MODE. More... | |
static uint8_t | menu_5_configure_GPIO_pins_menu_4 () |
static uint8_t | menu_5_write_register_values_to_EEPROM_menu_5 () |
Configure State of GPIO Pins. Set GPIO1 as POWERGOOD/POWERBAD/GPO/GPI, OverFlow Alert, GPIO2 Stress Mode etc. More... | |
static uint8_t | menu_5_restore_register_values_from_EEPROM_menu_6 () |
Write Values currently present in the Registers of the LTC4282 to the EEPROM. More... | |
static void | setup () |
Initialize Linduino. More... | |
static void | loop () |
Macros | |
#define | CONTINUOUS_MODE_DISPLAY_DELAY 2000 |
Restore Values Currently Present in the EEPROM to the Registers of the LTC4282. More... | |
Variables | |
const float | resistor = 343.7E-6 |
resistor value on demo board More... | |
const int | CLK_DIVIDER = 0x08 |
CLK Frequency. More... | |
static float | voltage_fullscale |
Fullscale Voltage Setting Shared Across Functions For Polling Routines. 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 |
Definition at line 173 of file DC2024A.ino.
|
static |
Continious Mode.
CTRLREG_LSB | Control LSB Register Code. Necessary to Check which Voltage Mode the Part is set to. Configured in Settings Menu. |
ILIM_ADJUST | ILIM_ADJUST Register Code. Necessary to Check Whether the Part is Configured as a Coulomb Meter or an Energy Meter. Also Checks Resolution Mode. Configured in Settings Menu. |
CLK_DECIMATOR | CLK_DECIMATOR Register Code. Sets the Clock Rate for the Energy/Coulomb Meter. Configured in the Settings Menu. |
Definition at line 232 of file DC2024A.ino.
|
static |
Continuous Mode Measurement.
Set Alarm Thresholds.
CTRLREG_LSB | Control LSB Value Passed On to Determine VIN MODE For Proper Voltage Conversion Of Thresholds. ) |
Definition at line 491 of file DC2024A.ino.
|
static |
View Faults.
Clear Faults.
Definition at line 781 of file DC2024A.ino.
|
static |
Set Alarm Thresholds.
View Faults And Clear Them.
Definition at line 629 of file DC2024A.ino.
|
static |
View/Clear Faults.
View Faults.
Definition at line 676 of file DC2024A.ino.
|
static |
Set Alert MSB Register.
Definition at line 966 of file DC2024A.ino.
|
static |
Set Alert Registers.
Set Alert MSB Register.
Definition at line 849 of file DC2024A.ino.
|
static |
Clear Faults.
Set Alert Register Menu.
Definition at line 797 of file DC2024A.ino.
|
static |
Definition at line 1550 of file DC2024A.ino.
|
static |
Write Values currently present in the Registers of the LTC4282 to the EEPROM.
Definition at line 1855 of file DC2024A.ino.
|
static |
Control MSB Register Menu. Configure OV/UV/OC Autoretry, FET ON, Mass Write Enable, ON/ENB, ON DELAY and ON FAULT MASK.
CTRLREG_LSB | Local Control LSB Register to Change Through Settings. This is shared across multiple functions such as Continious mode. |
Definition at line 1262 of file DC2024A.ino.
|
static |
Settings.
Control MSB Register Menu. Configure OV/UV/OC Autoretry, FET ON, Mass Write Enable, ON/ENB, ON DELAY and ON FAULT MASK.
CTRLREG_MSB | Local Control MSB Register to Change Through Settings. This is shared across multiple functions such as Continious mode. |
Definition at line 1148 of file DC2024A.ino.
|
static |
Control LSB Register Menu. Configure Thresholds for POWER GOOD/OV/UV as well as for VIN MODE.
ILIM_ADJUST | Local ILIM ADJUST Register to Change Through Settings. This is shared across multiple functions such as Continious mode. |
Definition at line 1399 of file DC2024A.ino.
|
static |
Set Alert LSB Register.
Settings Menu.
CTRLREG_MSB | Local Control MSB Register to Change Through Settings. This is shared across multiple functions such as Continious mode. |
CTRLREG_LSB | Local Control LSB Register to Change Through Settings. This is shared across multiple functions such as Continious mode. |
ILIM_ADJUST | Local ILIM ADJUST Register to Change Through Settings. This is shared across multiple functions such as Continious mode. |
CLK_DECIMATOR | Local ILIM ADJUST Register to Change Through Settings. This is shared across multiple functions such as Continious mode. |
Definition at line 1080 of file DC2024A.ino.
|
static |
Configure State of GPIO Pins. Set GPIO1 as POWERGOOD/POWERBAD/GPO/GPI, OverFlow Alert, GPIO2 Stress Mode etc.
Definition at line 1711 of file DC2024A.ino.
|
static |
Print the Prompt.
Definition at line 139 of file DC2024A.ino.
|
static |
Print the title block.
Definition at line 125 of file DC2024A.ino.
|
static |
Initialize Linduino.
Definition at line 152 of file DC2024A.ino.
#define CONTINUOUS_MODE_DISPLAY_DELAY 2000 |
Restore Values Currently Present in the EEPROM to the Registers of the LTC4282.
The delay between readings
Definition at line 109 of file DC2024A.ino.
const char ack_error[] = "Error: No Acknowledge. Check I2C Address." |
Error message.
Definition at line 118 of file DC2024A.ino.
const int CLK_DIVIDER = 0x08 |
CLK Frequency.
Definition at line 112 of file DC2024A.ino.
|
static |
Set to 1 if the board is connected.
Definition at line 121 of file DC2024A.ino.
const float resistor = 343.7E-6 |
resistor value on demo board
Definition at line 111 of file DC2024A.ino.
|
static |
Fullscale Voltage Setting Shared Across Functions For Polling Routines.
Definition at line 113 of file DC2024A.ino.