![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
LTC6810: 6-Channel Battery Stack Monitors. More...
LTC6810: 6-Channel Battery Stack Monitors.
*The LTC6810 is multi-cell battery stack monitor that measures up to 6 series *connected battery cells with a total measurement error of less than 1.8mV. *The cell measurement range of 0V to 5V makes the LTC6810 suitable for most *battery chemistries. All 6 cell voltages can be captured in 290uS, and lower *data acquisition rates can be selected for high noise reduction. *Using the LTC6810-1, multiple devices are connected in a daisy-chain with one *host processor connection for all devices, permitting simultaneous cell monitoring *of long, high voltage battery strings. *
https://www.analog.com/en/products/ltc6810-1.html
Copyright 2019(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.
Header for LTC6810-1 Multicell Battery Monitor
Definition in file LTC6810.h.
Go to the source code of this file.
Functions | |
void | LTC6810_init_reg_limits (uint8_t total_ic, cell_asic *ic) |
Initialize the Register limits. More... | |
void | LTC6810_wrcfg (uint8_t nIC, cell_asic *ic) |
Write the LTC6810 configuration register. More... | |
int8_t | LTC6810_rdcfg (uint8_t nIC, cell_asic *ic) |
Reads configuration registers of a LTC6810 daisy chain. More... | |
void | LTC6810_adcv (uint8_t MD, uint8_t DCP, uint8_t CH) |
Starts cell voltage conversion. More... | |
void | LTC6810_adax (uint8_t MD, uint8_t CHG) |
Start a GPIO, cell 0 and Vref2 Conversion. More... | |
void | LTC6810_adstat (uint8_t MD, uint8_t CHST) |
Start a Status ADC Conversion. More... | |
void | LTC6810_adcvax (uint8_t MD, uint8_t DCP) |
Starts cell voltage, Cell 0 and GPIO 1 conversion. More... | |
void | LTC6810_adcvsc (uint8_t MD, uint8_t DCP) |
Starts cell voltage and SOC conversion. More... | |
uint8_t | LTC6810_rdcv (uint8_t reg, uint8_t total_ic, cell_asic *ic) |
Reads and parses the LTC6810 cell voltage registers. More... | |
int8_t | LTC6810_rdaux (uint8_t reg, uint8_t nIC, cell_asic *ic) |
Reads and parses the LTC6810 auxiliary registers. More... | |
int8_t | LTC6810_rdstat (uint8_t reg, uint8_t total_ic, cell_asic *ic) |
Reads and parses the LTC6810 stat registers. More... | |
uint8_t | LTC6810_rds (uint8_t reg, uint8_t total_ic, cell_asic *ic) |
Reads and parses the LTC6810 S voltage registers. More... | |
void | LTC6810_rds_reg (uint8_t reg, uint8_t total_ic, uint8_t *data) |
Reads the raw S voltage register data. More... | |
uint8_t | LTC6810_pladc () |
Sends the poll ADC command. More... | |
uint32_t | LTC6810_pollAdc () |
This function will block operation until the ADC has finished it's conversion. More... | |
void | LTC6810_clrcell () |
Clears the LTC6810 cell voltage registers. More... | |
void | LTC6810_clraux () |
Clears the LTC6810 Auxiliary registers. More... | |
void | LTC6810_clrstat () |
Clears the LTC6810 Stat registers. More... | |
void | LTC6810_diagn () |
Starts the Mux Decoder diagnostic self test. More... | |
void | LTC6810_cvst (uint8_t MD, uint8_t ST) |
Starts Cell voltage self test conversion. More... | |
void | LTC6810_axst (uint8_t MD, uint8_t ST) |
Start an Auxiliary Register Self Test Conversion. More... | |
void | LTC6810_statst (uint8_t MD, uint8_t ST) |
Start a Status Register Self Test Conversion. More... | |
void | LTC6810_adaxd (uint8_t MD, uint8_t CHG) |
Start an GPIO Redundancy test. More... | |
void | LTC6810_adstatd (uint8_t MD, uint8_t CHST) |
Start a Status register redundancy test Conversion. More... | |
int16_t | LTC6810_run_cell_adc_st (uint8_t adc_reg, uint8_t total_ic, cell_asic *ic, uint8_t md, bool adcopt) |
Helper function that runs the ADC Self Tests. More... | |
int16_t | LTC6810_run_adc_redundancy_st (uint8_t adc_mode, uint8_t adc_reg, uint8_t total_ic, cell_asic *ic) |
Helper function that runs the ADC Digital Redundancy commands and checks output for errors. More... | |
void | LTC6810_adow (uint8_t MD, uint8_t PUP, uint8_t CH, uint8_t DCP) |
Start an open wire Conversion. More... | |
void | LTC6810_axow (uint8_t MD, uint8_t PUP) |
Start GPIOs open wire ADC conversion. More... | |
void | LTC6810_run_openwire_single (uint8_t total_ic, cell_asic *ic) |
Helper function that runs the data sheet open wire algorithm for single cell detection. More... | |
void | LTC6810_run_openwire_multi (uint8_t total_ic, cell_asic *ic) |
Runs the data sheet algorithm for open wire for multiple cell and two consecutive cells detection. More... | |
void | LTC6810_run_gpio_openwire (uint8_t total_ic, cell_asic *ic) |
Runs open wire for GPIOs. More... | |
void | LTC6810_set_discharge (int Cell, uint8_t total_ic, cell_asic *ic) |
Helper function to set discharge bit in CFG register. More... | |
void | LTC6810_clear_discharge (uint8_t total_ic, cell_asic *ic) |
Clears all of the DCC bits in the configuration registers. More... | |
void | LTC6810_wrpwm (uint8_t total_ic, uint8_t pwmReg, cell_asic *ic) |
Writes to the LTC6810 PWM register of LTC6810. More... | |
int8_t | LTC6810_rdpwm (uint8_t total_ic, uint8_t pwmReg, cell_asic *ic) |
Reads pwm registers of the LTC6810 in daisy chain. More... | |
void | LTC6810_wrcomm (uint8_t total_ic, cell_asic *ic) |
Write the LTC6810 COMM register. More... | |
int8_t | LTC6810_rdcomm (uint8_t total_ic, cell_asic *ic) |
Reads comm registers of a LTC6810 in daisy chain. More... | |
void | LTC6810_stcomm (uint8_t len) |
Issues a stcomm command and clocks data out of the COMM register. More... | |
uint8_t | LTC6810_rdsid (uint8_t total_ic, cell_asic *ic) |
Reads Serial ID registers group. More... | |
void | LTC6810_mute () |
Mutes the LTC6810 discharge transistors. More... | |
void | LTC6810_unmute () |
Clears the LTC6810 Mute Discharge. More... | |
void | LTC6810_check_pec (uint8_t total_ic, uint8_t reg, cell_asic *ic) |
Helper Function that counts overall PEC errors and register/IC PEC errors. More... | |
void | LTC6810_reset_crc_count (uint8_t total_ic, cell_asic *ic) |
Helper Function that resets the PEC error counters. More... | |
void | LTC6810_init_cfg (uint8_t total_ic, cell_asic *ic) |
Helper Function to initialize the CFGR data structures. More... | |
void | LTC6810_set_cfgr (uint8_t nIC, cell_asic *ic, bool refon, bool adcopt, bool gpio[4], bool dcc[6], bool dcc_0, bool mcal, bool en_dtmen, bool dis_red, bool fdrf, bool sconv, bool dcto[4], uint16_t uv, uint16_t ov) |
Helper function to set appropriate bits in CFGR register based on bit function. More... | |
void | LTC6810_set_cfgr_refon (uint8_t nIC, cell_asic *ic, bool refon) |
Helper function to turn the REFON bit HIGH or LOW. More... | |
void | LTC6810_set_cfgr_adcopt (uint8_t nIC, cell_asic *ic, bool adcopt) |
Helper function to turn the ADCOPT bit HIGH or LOW. More... | |
void | LTC6810_set_cfgr_gpio (uint8_t nIC, cell_asic *ic, bool gpio[]) |
Helper function to turn the GPIO bits HIGH or LOW. More... | |
void | LTC6810_set_cfgr_dis (uint8_t nIC, cell_asic *ic, bool dcc[]) |
Helper function to turn the DCC bits HIGH or LOW. More... | |
void | LTC6810_set_cfgr_uv (uint8_t nIC, cell_asic *ic, uint16_t uv) |
Helper function to set uv field in CFGRA register. More... | |
void | LTC6810_set_cfgr_ov (uint8_t nIC, cell_asic *ic, uint16_t ov) |
Helper function to set ov field in CFGRA register. More... | |
void | LTC6810_set_cfgr_mcal (uint8_t nIC, cell_asic *ic, bool mcal) |
Helper function to set the MCAL bit. More... | |
void | LTC6810_set_cfgr_dcc_0 (uint8_t nIC, cell_asic *ic, bool dcc_0) |
Helper function to set the DCC_0 bit. More... | |
void | LTC6810_set_cfgr_en_dtmen (uint8_t nIC, cell_asic *ic, bool en_dtmen) |
Helper function to set the EN_DTMEN bit. More... | |
void | LTC6810_set_cfgr_dis_red (uint8_t nIC, cell_asic *ic, bool dis_red) |
Helper function to set the DIS_RED bit. More... | |
void | LTC6810_set_cfgr_fdrf (uint8_t nIC, cell_asic *ic, bool fdrf) |
Helper function to set the FDRF bit. More... | |
void | LTC6810_set_cfgr_sconv (uint8_t nIC, cell_asic *ic, bool sconv) |
Helper function to set the SCONV bit. More... | |
void | LTC6810_set_cfgr_dcto (uint8_t nIC, cell_asic *ic, bool dcto[]) |
Helper function to set the DCTO bit. More... | |
Macros | |
#define | CELL 1 |
#define | AUX 2 |
#define | STAT 3 |
void LTC6810_adax | ( | uint8_t | MD, |
uint8_t | CHG | ||
) |
Start a GPIO, cell 0 and Vref2 Conversion.
MD | ADC Conversion Mode |
CHG | Sets which GPIO channels are converted |
Definition at line 113 of file LTC6810.cpp.
void LTC6810_adaxd | ( | uint8_t | MD, |
uint8_t | CHG | ||
) |
Start an GPIO Redundancy test.
MD | ADC Conversion Mode |
CHG | Sets which GPIO channels are converted |
Definition at line 352 of file LTC6810.cpp.
void LTC6810_adcv | ( | uint8_t | MD, |
uint8_t | DCP, | ||
uint8_t | CH | ||
) |
Starts cell voltage conversion.
MD | ADC Conversion Mode |
DCP | Controls if Discharge is permitted during conversion |
CH | Sets which Cell channels are converted |
Definition at line 104 of file LTC6810.cpp.
void LTC6810_adcvax | ( | uint8_t | MD, |
uint8_t | DCP | ||
) |
Starts cell voltage, Cell 0 and GPIO 1 conversion.
MD | ADC Conversion Mode |
DCP | Controls if Discharge is permitted during conversion |
Definition at line 137 of file LTC6810.cpp.
void LTC6810_adcvsc | ( | uint8_t | MD, |
uint8_t | DCP | ||
) |
Starts cell voltage and SOC conversion.
MD | ADC Conversion Mode |
DCP | Controls if Discharge is permitted during conversion |
Definition at line 129 of file LTC6810.cpp.
void LTC6810_adow | ( | uint8_t | MD, |
uint8_t | PUP, | ||
uint8_t | CH, | ||
uint8_t | DCP | ||
) |
Start an open wire Conversion.
MD | ADC Conversion Mode |
PUP | Pull up/Pull down current |
CH | Channels |
DCP | Discharge Permit |
Definition at line 393 of file LTC6810.cpp.
void LTC6810_adstat | ( | uint8_t | MD, |
uint8_t | CHST | ||
) |
Start a Status ADC Conversion.
MD | ADC Conversion Mode |
CHST | Sets which Stat channels are converted |
Definition at line 121 of file LTC6810.cpp.
void LTC6810_adstatd | ( | uint8_t | MD, |
uint8_t | CHST | ||
) |
Start a Status register redundancy test Conversion.
MD | ADC Mode |
CHST | Sets which Status channels are converted |
Definition at line 360 of file LTC6810.cpp.
void LTC6810_axow | ( | uint8_t | MD, |
uint8_t | PUP | ||
) |
Start GPIOs open wire ADC conversion.
MD | ADC Mode |
PUP | Pull up/Pull down current |
Definition at line 403 of file LTC6810.cpp.
void LTC6810_axst | ( | uint8_t | MD, |
uint8_t | ST | ||
) |
Start an Auxiliary Register Self Test Conversion.
MD | ADC Conversion Mode |
ST | Sets if self test 1 or 2 is run |
Definition at line 336 of file LTC6810.cpp.
void LTC6810_check_pec | ( | uint8_t | total_ic, |
uint8_t | reg, | ||
cell_asic * | ic | ||
) |
Helper Function that counts overall PEC errors and register/IC PEC errors.
total_ic | Number of ICs in the daisy chain |
reg | Type of register |
ic | A two dimensional array that will store the data |
Definition at line 643 of file LTC6810.cpp.
void LTC6810_clear_discharge | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Clears all of the DCC bits in the configuration registers.
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array that will store the data |
Definition at line 529 of file LTC6810.cpp.
void LTC6810_clraux | ( | ) |
void LTC6810_clrcell | ( | ) |
void LTC6810_clrstat | ( | ) |
void LTC6810_cvst | ( | uint8_t | MD, |
uint8_t | ST | ||
) |
Starts Cell voltage self test conversion.
MD | ADC Conversion Mode |
ST | Sets if self test 1 or 2 is run |
Definition at line 328 of file LTC6810.cpp.
void LTC6810_diagn | ( | ) |
Starts the Mux Decoder diagnostic self test.
Running this command will start the Mux Decoder Diagnostic Self Test. This test takes roughly 1ms to complete. The MUXFAIL bit will be updated. The bit will be set to 1 for a failure and 0 if the test has been passed.
Definition at line 322 of file LTC6810.cpp.
void LTC6810_init_cfg | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Helper Function to initialize the CFGR data structures.
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array that will store the data |
Definition at line 660 of file LTC6810.cpp.
void LTC6810_init_reg_limits | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Initialize the Register limits.
total_ic | Number of ICs in the system |
ic | A two dimensional array that will store the data |
Definition at line 66 of file LTC6810.cpp.
void LTC6810_mute | ( | ) |
uint8_t LTC6810_pladc | ( | ) |
Sends the poll ADC command.
Definition at line 280 of file LTC6810.cpp.
uint32_t LTC6810_pollAdc | ( | ) |
This function will block operation until the ADC has finished it's conversion.
Definition at line 286 of file LTC6810.cpp.
int8_t LTC6810_rdaux | ( | uint8_t | reg, |
uint8_t | nIC, | ||
cell_asic * | ic | ||
) |
Reads and parses the LTC6810 auxiliary registers.
reg | Determines which GPIO voltage register is read back |
nIC | The number of ICs in the daisy chain |
ic | A two dimensional array of the parsed gpio voltage codes |
Definition at line 166 of file LTC6810.cpp.
int8_t LTC6810_rdcfg | ( | uint8_t | nIC, |
cell_asic * | ic | ||
) |
Reads configuration registers of a LTC6810 daisy chain.
nIC | Number of ICs in the daisy chain |
ic | A two dimensional array that the function stores the read configuration data |
Definition at line 94 of file LTC6810.cpp.
int8_t LTC6810_rdcomm | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Reads comm registers of a LTC6810 in daisy chain.
total_ic | Number of ICs in the daisy chain |
ic | Two dimensional array that the function stores the read comm data. |
Definition at line 569 of file LTC6810.cpp.
uint8_t LTC6810_rdcv | ( | uint8_t | reg, |
uint8_t | total_ic, | ||
cell_asic * | ic | ||
) |
Reads and parses the LTC6810 cell voltage registers.
reg | Determines which cell voltage register is read back. |
total_ic | The number of ICs in the daisy chain |
ic | Array of the parsed cell codes |
Definition at line 150 of file LTC6810.cpp.
int8_t LTC6810_rdpwm | ( | uint8_t | total_ic, |
uint8_t | pwmReg, | ||
cell_asic * | ic | ||
) |
Reads pwm registers of the LTC6810 in daisy chain.
total_ic | Number of ICs in the daisy chain |
pwmReg | Select register |
ic | A two dimensional array that the function stores the read pwm data |
Definition at line 549 of file LTC6810.cpp.
uint8_t LTC6810_rds | ( | uint8_t | reg, |
uint8_t | total_ic, | ||
cell_asic * | ic | ||
) |
Reads and parses the LTC6810 S voltage registers.
reg | Determines which S voltage registers is read back. |
total_ic | The number of ICs in the system |
ic | Array of the parsed cell codes |
Definition at line 198 of file LTC6810.cpp.
void LTC6810_rds_reg | ( | uint8_t | reg, |
uint8_t | total_ic, | ||
uint8_t * | data | ||
) |
Reads the raw S voltage register data.
reg | Determines which s voltage register is read back |
total_ic | The number of ICs in the daisy-chain |
data | An array of the unparsed cell codes |
Definition at line 256 of file LTC6810.cpp.
uint8_t LTC6810_rdsid | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Reads Serial ID registers group.
total_ic | The number of ICs in the system |
ic | A two dimensional array that will store the read data |
Definition at line 585 of file LTC6810.cpp.
int8_t LTC6810_rdstat | ( | uint8_t | reg, |
uint8_t | total_ic, | ||
cell_asic * | ic | ||
) |
Reads and parses the LTC6810 stat registers.
reg | Determines which Stat register is read back. |
total_ic | The number of ICs in the system |
ic | A two dimensional array of the parsed stat codes |
Definition at line 182 of file LTC6810.cpp.
void LTC6810_reset_crc_count | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Helper Function that resets the PEC error counters.
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array that will store the data |
Definition at line 652 of file LTC6810.cpp.
int16_t LTC6810_run_adc_redundancy_st | ( | uint8_t | adc_mode, |
uint8_t | adc_reg, | ||
uint8_t | total_ic, | ||
cell_asic * | ic | ||
) |
Helper function that runs the ADC Digital Redundancy commands and checks output for errors.
adc_mode | ADC Mode |
adc_reg | Type of register |
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array that will store the data |
Definition at line 381 of file LTC6810.cpp.
int16_t LTC6810_run_cell_adc_st | ( | uint8_t | adc_reg, |
uint8_t | total_ic, | ||
cell_asic * | ic, | ||
uint8_t | md, | ||
bool | adcopt | ||
) |
Helper function that runs the ADC Self Tests.
adc_reg | Type of register |
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array that will store the data |
md | ADC Mode |
adcopt | the adcopt bit in the configuration register |
Definition at line 368 of file LTC6810.cpp.
void LTC6810_run_gpio_openwire | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Runs open wire for GPIOs.
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array that will store the data |
void LTC6810_run_openwire_multi | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Runs the data sheet algorithm for open wire for multiple cell and two consecutive cells detection.
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array that will store the data |
Definition at line 419 of file LTC6810.cpp.
void LTC6810_run_openwire_single | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Helper function that runs the data sheet open wire algorithm for single cell detection.
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array that will store the data |
Definition at line 411 of file LTC6810.cpp.
void LTC6810_set_cfgr | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | refon, | ||
bool | adcopt, | ||
bool | gpio[4], | ||
bool | dcc[6], | ||
bool | dcc_0, | ||
bool | mcal, | ||
bool | en_dtmen, | ||
bool | dis_red, | ||
bool | fdrf, | ||
bool | sconv, | ||
bool | dcto[4], | ||
uint16_t | uv, | ||
uint16_t | ov | ||
) |
Helper function to set appropriate bits in CFGR register based on bit function.
nIC | Current IC |
ic | A two dimensional array that will store the data |
refon | The REFON bit |
adcopt | The ADCOPT bit |
gpio | The GPIO bits |
dcc | The DCC bits |
dcc_0 | The DCC bit |
mcal | Enable Multi-Calibration |
en_dtmen | Enable Discharge timer monitor |
dis_red | Disable Digital Redundancy Check |
fdrf | Force digital Redundancy Failure |
sconv | Enable Cell Measurement Redundancy using S Pin |
dcto | Discharge Time Out Value |
uv | The UV value |
ov | The OV value |
Definition at line 666 of file LTC6810.cpp.
void LTC6810_set_cfgr_adcopt | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | adcopt | ||
) |
Helper function to turn the ADCOPT bit HIGH or LOW.
nIC | Current IC |
ic | A two dimensional array that will store the data |
adcopt | The ADCOPT bit |
Definition at line 690 of file LTC6810.cpp.
void LTC6810_set_cfgr_dcc_0 | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | dcc_0 | ||
) |
Helper function to set the DCC_0 bit.
nIC | Current IC |
ic | A two dimensional array that will store the data |
dcc_0 | The DCC bit |
Definition at line 735 of file LTC6810.cpp.
void LTC6810_set_cfgr_dcto | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | dcto[] | ||
) |
Helper function to set the DCTO bit.
nIC | Current IC |
ic | A two dimensional array that will store the data |
dcto | Discharge Time Out Value |
void LTC6810_set_cfgr_dis | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | dcc[] | ||
) |
Helper function to turn the DCC bits HIGH or LOW.
nIC | Current IC |
ic | A two dimensional array that will store the data |
dcc | The DCC bits |
void LTC6810_set_cfgr_dis_red | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | dis_red | ||
) |
Helper function to set the DIS_RED bit.
nIC | Current IC |
ic | A two dimensional array that will store the data |
dis_red | Disable Digital Redundancy Check |
Definition at line 749 of file LTC6810.cpp.
void LTC6810_set_cfgr_en_dtmen | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | en_dtmen | ||
) |
Helper function to set the EN_DTMEN bit.
nIC | Current IC |
ic | A two dimensional array that will store the data |
en_dtmen | Enable Discharge timer monitor |
Definition at line 742 of file LTC6810.cpp.
void LTC6810_set_cfgr_fdrf | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | fdrf | ||
) |
Helper function to set the FDRF bit.
nIC | Current IC |
ic | A two dimensional array that will store the data |
fdrf | Force digital Redundancy Failure |
Definition at line 756 of file LTC6810.cpp.
void LTC6810_set_cfgr_gpio | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | gpio[] | ||
) |
Helper function to turn the GPIO bits HIGH or LOW.
nIC | Current IC |
ic | A two dimensional array that will store the data |
gpio | The GPIO bits |
void LTC6810_set_cfgr_mcal | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | mcal | ||
) |
Helper function to set the MCAL bit.
nIC | Current IC |
ic | A two dimensional array that will store the data |
mcal | Enable Multi-Calibration |
Definition at line 728 of file LTC6810.cpp.
void LTC6810_set_cfgr_ov | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
uint16_t | ov | ||
) |
Helper function to set ov field in CFGRA register.
nIC | Current IC |
ic | A two dimensional array that will store the data |
ov | The OV value |
Definition at line 722 of file LTC6810.cpp.
void LTC6810_set_cfgr_refon | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | refon | ||
) |
Helper function to turn the REFON bit HIGH or LOW.
nIC | Current IC |
ic | A two dimensional array that will store the data |
refon | The REFON bit |
Definition at line 684 of file LTC6810.cpp.
void LTC6810_set_cfgr_sconv | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
bool | sconv | ||
) |
Helper function to set the SCONV bit.
nIC | Current IC |
ic | A two dimensional array that will store the data |
sconv | Enable Cell Measurement Redundancy using S Pin |
Definition at line 763 of file LTC6810.cpp.
void LTC6810_set_cfgr_uv | ( | uint8_t | nIC, |
cell_asic * | ic, | ||
uint16_t | uv | ||
) |
Helper function to set uv field in CFGRA register.
nIC | Current IC |
ic | A two dimensional array that will store the data |
uv | The UV value |
Definition at line 716 of file LTC6810.cpp.
void LTC6810_set_discharge | ( | int | Cell, |
uint8_t | total_ic, | ||
cell_asic * | ic | ||
) |
Helper function to set discharge bit in CFG register.
Cell | The cell to be discharged |
total_ic | Number of ICs in the system |
ic | A two dimensional array that will store the data |
Definition at line 510 of file LTC6810.cpp.
void LTC6810_statst | ( | uint8_t | MD, |
uint8_t | ST | ||
) |
Start a Status Register Self Test Conversion.
MD | ADC Conversion Mode |
ST | Sets if self test 1 or 2 is run |
Definition at line 344 of file LTC6810.cpp.
void LTC6810_stcomm | ( | uint8_t | len | ) |
Issues a stcomm command and clocks data out of the COMM register.
len | Length of data to be transmitted |
Definition at line 579 of file LTC6810.cpp.
void LTC6810_unmute | ( | ) |
void LTC6810_wrcfg | ( | uint8_t | nIC, |
cell_asic * | ic | ||
) |
Write the LTC6810 configuration register.
nIC | The number of ICs being written |
ic | A two dimensional array of the configuration data that will be written |
Definition at line 86 of file LTC6810.cpp.
void LTC6810_wrcomm | ( | uint8_t | total_ic, |
cell_asic * | ic | ||
) |
Write the LTC6810 COMM register.
total_ic | Number of ICs in the daisy chain |
ic | A two dimensional array of the comm data that will be written |
Definition at line 561 of file LTC6810.cpp.
void LTC6810_wrpwm | ( | uint8_t | total_ic, |
uint8_t | pwmReg, | ||
cell_asic * | ic | ||
) |
Writes to the LTC6810 PWM register of LTC6810.
total_ic | Number of ICs in the daisy chain |
pwmReg | Select register |
ic | A two dimensional array that will store the data to be written |
Definition at line 540 of file LTC6810.cpp.