DC2100A  1.2.0
Bi-Directional Cell Balancer Using the LTC3300-1 and the LTC6804-2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LTC6804-2.h File Reference

API Header File for LTC6804-2 Multicell Battery Monitors. More...

Go to the source code of this file.

Detailed Description

API Header File for LTC6804-2 Multicell Battery Monitors.

Definition in file LTC6804-2.h.

Functions

void LTC6804_Init (void)
 Initializes the LTC6804-2 code module. More...
 
BOOLEAN LTC6804_Revision_Get (int8 board_num, unsigned int8 *revision)
 Gets the LTC6804 revision. More...
 
void LTC6804_GPIO_Set (int8 board_num, int8 gpio_bitmap)
 Sets the LTC6804 GPIO Pull Downs. More...
 
BOOLEAN LTC6804_Refon_Get (int8 board_num, int8 *refon)
 Gets the LTC6804 ADC Reference status, where 1 = ON and 0 = OFF. More...
 
void LTC6804_Refon_Set (int8 board_num, BOOLEAN refon)
 Turns the LTC6804 ADC Reference on and off. More...
 
void LTC6804_Dischargers_Set (int8 board_num, int16 discharge_bitmap, int16 timeout_value)
 Sets the LTC6804 discharger pin levels and timeout values. More...
 
void LTC6804_UVOV_Thresholds_Set (int8 board_num, int16 vuv_value, int16 vov_value)
 Sets the LTC6804 under-voltage and over-voltage thresholds in LTC6804_UVOV_RESOLUTION units. More...
 
BOOLEAN LTC6804_UVOV_Thresholds_Get (int8 board_num, unsigned int16 *vuv_value, unsigned int16 *vov_value)
 Gets the LTC6804 under-voltage and over-voltage thresholds in LTC6804_UVOV_RESOLUTION units. More...
 
BOOLEAN LTC6804_UVOV_Flags_Get (int8 board_num, int16 *vuv_flags, int16 *vov_flags)
 Gets the LTC6804 flags indicating under-voltage and over-voltage conditions are present. More...
 
void LTC6804_Cell_ADC_Clear (int8 board_num)
 Clears the LTC6804 Cell Voltage ADC registers. More...
 
void LTC6804_Cell_ADC_Start (int8 board_num, LTC6804_CONVERSION_MODE_T mode, LTC6804_CH_CELL_TYPE cell_select, BOOLEAN discharge_permitted)
 Starts the LTC6804 Cell Voltage ADC conversion at the specified conversion mode. More...
 
BOOLEAN LTC6804_Cell_ADC_Read (int8 board_num, LTC6804_CH_CELL_TYPE cell_select, unsigned int16 *adc_value_ptr)
 Reads the LTC6804 Cell Voltage ADC conversion results. More...
 
void LTC6804_GPIO_ADC_Clear (int8 board_num)
 Clears the LTC6804 GPIO ADC registers. More...
 
void LTC6804_GPIO_ADC_Start (int8 board_num, LTC6804_CONVERSION_MODE_T mode, LTC6804_CHG_GPIO_TYPE gpio_select)
 Starts the specified LTC6804 GPIO ADC conversion at the specified conversion mode. More...
 
BOOLEAN LTC6804_GPIO_ADC_Read (int8 board_num, LTC6804_CHG_GPIO_TYPE gpio_select, int16 *adc_value_ptr)
 Reads the specified LTC6804 GPIO ADC conversion results. More...
 
void LTC6804_I2C_Write (int8 board_num, BOOLEAN start, BOOLEAN stop, int8 *data_ptr, int16 num_bytes, int16 baud_khz)
 Writes a string of bytes to the LTC6804 I2C port implemented on its GPIO pins. More...
 
BOOLEAN LTC6804_I2C_Read (int8 board_num, BOOLEAN start, BOOLEAN stop, int8 *data_ptr, int16 num_bytes, int16 baud_khz)
 Writes one byte, and then reads a string of bytes to the LTC6804 I2C port implemented on its GPIO pins. More...
 
void LTC6804_SPI_Write (int8 board_num, BOOLEAN start, BOOLEAN stop, int8 *data_ptr, int16 num_bytes, int16 baud_khz)
 Writes a string of bytes to the LTC6804 SPI port implemented on its GPIO pins. More...
 
BOOLEAN LTC6804_SPI_Read (int8 board_num, BOOLEAN start, BOOLEAN stop, int8 *data_ptr, int16 num_bytes, int16 baud_khz)
 Writes one byte, and then reads a string of bytes to the LTC6804 SPI port implemented on its GPIO pins. More...
 
unsigned int16 LTC6804_PEC_Calc (char *data, int length)
 Calculates the LTC6804 CRC over a string of bytes as per datasheet figure 22. More...
 

Macros

#define LTC6804_REGISTER_GROUP_TIME
 
LTC6804-2 Driver Properties
#define LTC6804_MAX_BOARDS   16
 The maximum number of addresses available to the LTC6804-2. More...
 
#define LTC6804_BROADCAST   LTC6804_MAX_BOARDS
 Code for application code to indicate an LTC6804 command is to be broadcast to all boards. More...
 
#define LTC6804_NUM_CELLV_ADC   12
 Number of cell voltage ADC measurements. More...
 
#define LTC6804_NUM_GPIO   5
 Number of GPIO pins available on LTC6804. More...
 
#define LTC6804_NUM_AUX_ADC   6
 Number of auxiliary ADC measurements. More...
 
#define LTC6804_ADC_CLEAR   0xFFFF
 ADC Value returned when results are cleared, but not retaken. More...
 
Conversion Delays

Reference wakeup time from datasheet Electrical Characteristics page 7.

Time for ADC results for one channel to be ready, from Table 6 (t1C). Time for ADC results for all channels to be ready, from Table 5 (t6C).

#define LTC6804_TREFUP   4400
 in us, max reference wakeup time. More...
 
#define LTC6804_CONVERSION_27KHZ_DELAY   201
 in us, delay between sampling and reading ADC in 27kHz conversion mode More...
 
#define LTC6804_CONVERSION_14KHZ_DELAY   230
 in us, delay between sampling and reading ADC in 14kHz conversion mode More...
 
#define LTC6804_CONVERSION_7KHZ_DELAY   405
 in us, delay between sampling and reading ADC in 7kHz conversion mode More...
 
#define LTC6804_CONVERSION_3KHZ_DELAY   501
 in us, delay between sampling and reading ADC in 3kHz conversion mode More...
 
#define LTC6804_CONVERSION_2KHZ_DELAY   754
 in us, delay between sampling and reading ADC in 2kHz conversion mode More...
 
#define LTC6804_CONVERSION_26HZ_DELAY   34
 in ms, delay between sampling and reading ADC in 26Hz conversion mode More...
 
#define LTC6804_CONVERSIONS_ALL_27KHZ_DELAY   11130
 in us, delay between sampling and reading ADC in 27kHz conversion mode More...
 
#define LTC6804_CONVERSIONS_ALL_14KHZ_DELAY   1288
 in us, delay between sampling and reading ADC in 14kHz conversion mode More...
 
#define LTC6804_CONVERSIONS_ALL_7KHZ_DELAY   2335
 in us, delay between sampling and reading ADC in 7kHz conversion mode More...
 
#define LTC6804_CONVERSIONS_ALL_3KHZ_DELAY   3033
 in us, delay between sampling and reading ADC in 3kHz conversion mode More...
 
#define LTC6804_CONVERSIONS_ALL_2KHZ_DELAY   4430
 in us, delay between sampling and reading ADC in 2kHz conversion mode More...
 
#define LTC6804_CONVERSIONS_ALL_26HZ_DELAY   202
 in ms, delay between sampling and reading ADC in 26Hz conversion mode More...
 
Voltage Resolution

Voltage resolutions from Table 46 (t6C)

#define LTC6804_VOLTAGE_RESOLUTION   100
 uV per bit (CxV), cell voltage resolution. More...
 
#define LTC6804_UVOV_RESOLUTION   (16*100)
 uV per bit (VUV and VOV), under-voltage and over-voltage resolution. More...
 
#define LTC6804_SOC_RESOLUTION   (20*100)
 uV per bit (SOC), sum-of-cells resolution. More...
 
#define LTC6804_V_SUPPLY_VOLTAGE   11000
 mV per bit, Minimum supply voltage from datasheet page 7. More...
 
Communication Protocol Constants

Communication Protocol Message Sizes, not including PEC, as specified by datasheet Table 26.

Baud Rate from from datasheet page 8

#define LTC6804_COMMAND_SIZE   2
 bytes per command More...
 
#define LTC6804_REGISTER_GROUP_SIZE   6
 bytes per register group More...
 
#define LTC6804_PEC_SIZE   sizeof(int16)
 15 bit PEC, requires int16 data type More...
 
#define LTC6804_ADC_SIZE   sizeof(int16)
 16 bit ADC results More...
 
#define LTC6804_BAUD_RATE   1000
 in kHz, Max input SPI Frequency (1/tCLK from datasheet) More...
 
#define LTC6804_COMMAND_TIME
 minimum time necessary to send a command in us More...
 

Enumerations

Cell Selections

Cell selection for ADC Conversion from datasheet table 35.

enum  LTC6804_CH_CELL_TYPE {
  LTC6804_CH_ALL = 0,
  LTC6804_CH_CELL_1_AND_7 = 1,
  LTC6804_CH_CELL_2_AND_8 = 2,
  LTC6804_CH_CELL_3_AND_9 = 3,
  LTC6804_CH_CELL_4_AND_10 = 4,
  LTC6804_CH_CELL_5_AND_11 = 5,
  LTC6804_CH_CELL_6_AND_12 = 6,
  LTC6804_CH_CELL_NUM
}
 
GPIO Selections

GPIO for ADC Conversion from datasheet table 35.

enum  LTC6804_CHG_GPIO_TYPE {
  LTC6804_CHG_GPIO_ALL = 0,
  LTC6804_CHG_GPIO1 = 1,
  LTC6804_CHG_GPIO2 = 2,
  LTC6804_CHG_GPIO3 = 3,
  LTC6804_CHG_GPIO4 = 4,
  LTC6804_CHG_GPIO5 = 5,
  LTC6804_CHG_GPIO_2ND_REF = 6,
  LTC6804_CHG_GPIO_NUM
}
 
Status Group Selections

Status Group Selections from datasheet table 35.

enum  LTC6804_CHST_TYPE {
  LTC6804_CHST_ALL = 0,
  LTC6804_CHST_SOC = 1,
  LTC6804_CHST_ITMP = 2,
  LTC6804_CHST_VA = 3,
  LTC6804_CHST_VD = 4,
  LTC6804_CHST_NUM
}
 
Conversion Modes

Conversion Modes Available in the LTC6804 from datasheet table 35.

enum  LTC6804_CONVERSION_MODE_T {
  LTC6804_CONVERSION_27KHZ_MODE = 0,
  LTC6804_CONVERSION_14KHZ_MODE = 1,
  LTC6804_CONVERSION_7KHZ_MODE = 2,
  LTC6804_CONVERSION_3KHZ_MODE = 3,
  LTC6804_CONVERSION_2KHZ_MODE = 4,
  LTC6804_CONVERSION_26HZ_MODE = 5,
  LTC6804_CONVERSION_NUM_MODES
}
 

Function Documentation

void LTC6804_Cell_ADC_Clear ( int8  board_num)

Clears the LTC6804 Cell Voltage ADC registers.

This is useful to detect if the conversion was started properly when the results are read.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.

Definition at line 447 of file LTC6804-2.c.

BOOLEAN LTC6804_Cell_ADC_Read ( int8  board_num,
LTC6804_CH_CELL_TYPE  cell_select,
unsigned int16 *  adc_value_ptr 
)

Reads the LTC6804 Cell Voltage ADC conversion results.

Returns
TRUE if the LTC6804 communication was successful.
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
cell_selectThe cells that were converted.
adc_value_ptrPointer where up to LTC6804_NUM_CELLV_ADC cell voltages will be returned.

Definition at line 502 of file LTC6804-2.c.

void LTC6804_Cell_ADC_Start ( int8  board_num,
LTC6804_CONVERSION_MODE_T  mode,
LTC6804_CH_CELL_TYPE  cell_select,
BOOLEAN  discharge_permitted 
)

Starts the LTC6804 Cell Voltage ADC conversion at the specified conversion mode.

Note function always permits discharge.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
modeThe mode to use for ADC conversion.
cell_selectThe cells to convert.
discharge_permittedTrue if discharge is to be permitted during this cell voltage conversion.

Definition at line 468 of file LTC6804-2.c.

void LTC6804_Dischargers_Set ( int8  board_num,
int16  discharge_bitmap,
int16  timeout_value 
)

Sets the LTC6804 discharger pin levels and timeout values.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
discharge_bitmapbitmap for discharger, bit0 = cell 0.
timeout_valuetimeout value for dischargers.

Definition at line 256 of file LTC6804-2.c.

void LTC6804_GPIO_ADC_Clear ( int8  board_num)

Clears the LTC6804 GPIO ADC registers.

This is useful to detect if the conversion was started properly when the results are read.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.

Definition at line 578 of file LTC6804-2.c.

BOOLEAN LTC6804_GPIO_ADC_Read ( int8  board_num,
LTC6804_CHG_GPIO_TYPE  gpio_select,
int16 *  adc_value_ptr 
)

Reads the specified LTC6804 GPIO ADC conversion results.

Returns
TRUE if the LTC6804 communication was successful.
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
gpio_selectThe gpio that was converted.
adc_value_ptrPointer where up to LTC6804_NUM_GPIO GPIO ADC results will be returned.

Definition at line 633 of file LTC6804-2.c.

void LTC6804_GPIO_ADC_Start ( int8  board_num,
LTC6804_CONVERSION_MODE_T  mode,
LTC6804_CHG_GPIO_TYPE  gpio_select 
)

Starts the specified LTC6804 GPIO ADC conversion at the specified conversion mode.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
modeThe mode to use for ADC conversion.
gpio_selectThe gpio to convert from LTC6804_CHG GPIO Selections.

Definition at line 599 of file LTC6804-2.c.

void LTC6804_GPIO_Set ( int8  board_num,
int8  gpio_bitmap 
)

Sets the LTC6804 GPIO Pull Downs.

Write: 0 -> GPIOx Pin Pull-Down ON; 1-> GPIOx Pin Pull-Down OFF

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
gpio_bitmapbitmap for GPIO pull-downs, bit0 = GPIO 0

Definition at line 185 of file LTC6804-2.c.

BOOLEAN LTC6804_I2C_Read ( int8  board_num,
BOOLEAN  start,
BOOLEAN  stop,
int8 *  data_ptr,
int16  num_bytes,
int16  baud_khz 
)

Writes one byte, and then reads a string of bytes to the LTC6804 I2C port implemented on its GPIO pins.

Returns
TRUE if the LTC6804 communication was successful.
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
startTRUE if this read would be started by an I2C Start Condition.
stopTRUE if this read would be ended with an I2C Stop Condition.
data_ptrPointer to a byte to first write to the I2C Bus, and where to store the data read from the I2C Bus.
num_bytesThe number of bytes to read to the I2C Bus.
baud_khzThe baud rate at which the I2C Bus should be clocked.

Definition at line 763 of file LTC6804-2.c.

void LTC6804_I2C_Write ( int8  board_num,
BOOLEAN  start,
BOOLEAN  stop,
int8 *  data_ptr,
int16  num_bytes,
int16  baud_khz 
)

Writes a string of bytes to the LTC6804 I2C port implemented on its GPIO pins.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
startTRUE if this write would be started by an I2C Start Condition.
stopTRUE if this write would be ended with an I2C Stop Condition.
data_ptrPointer to the data to write to the I2C Bus.
num_bytesThe number of bytes to write to the I2C Bus.
baud_khzThe baud rate at which the I2C Bus should be clocked.

Definition at line 703 of file LTC6804-2.c.

void LTC6804_Init ( void  )

Initializes the LTC6804-2 code module.

Returns
void

Definition at line 170 of file LTC6804-2.c.

unsigned int16 LTC6804_PEC_Calc ( char *  data,
int  length 
)

Calculates the LTC6804 CRC over a string of bytes as per datasheet figure 22.

Returns
the calculated CRC
Parameters
dataPointer to the data to over which to calculate the CRC.
lengthThe number of bytes over which to calculate the CRC.

Definition at line 1009 of file LTC6804-2.c.

BOOLEAN LTC6804_Refon_Get ( int8  board_num,
int8 *  refon 
)

Gets the LTC6804 ADC Reference status, where 1 = ON and 0 = OFF.

Returns
TRUE if the LTC6804 communication was successful.
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
refonlocation where to return the ADC Reference status.

Definition at line 406 of file LTC6804-2.c.

void LTC6804_Refon_Set ( int8  board_num,
BOOLEAN  refon 
)

Turns the LTC6804 ADC Reference on and off.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
refonTRUE to turn on the reference, FALSE to turn it off.

Definition at line 206 of file LTC6804-2.c.

BOOLEAN LTC6804_Revision_Get ( int8  board_num,
unsigned int8 *  revision 
)

Gets the LTC6804 revision.

Returns
TRUE if the LTC6804 communication was successful.
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
revisionPointer where to return revision.

Definition at line 373 of file LTC6804-2.c.

BOOLEAN LTC6804_SPI_Read ( int8  board_num,
BOOLEAN  start,
BOOLEAN  stop,
int8 *  data_ptr,
int16  num_bytes,
int16  baud_khz 
)

Writes one byte, and then reads a string of bytes to the LTC6804 SPI port implemented on its GPIO pins.

Returns
TRUE if the LTC6804 communication was successful.
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
startTRUE if the CS should be raised at the start of SPI communication.
stopTRUE if the CS should be lowered at the end of SPI communication.
data_ptrPointer to a byte to first write to the SPI Bus, and where to store the data read from the SPI Bus.
num_bytesThe number of bytes to write to the SPI Bus.
baud_khzThe baud rate at which the SPI Bus should be clocked.

Definition at line 912 of file LTC6804-2.c.

void LTC6804_SPI_Write ( int8  board_num,
BOOLEAN  start,
BOOLEAN  stop,
int8 *  data_ptr,
int16  num_bytes,
int16  baud_khz 
)

Writes a string of bytes to the LTC6804 SPI port implemented on its GPIO pins.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
startTRUE if the CS should be raised at the start of SPI communication.
stopTRUE if the CS should be lowered at the end of SPI communication.
data_ptrPointer to the data to write to the SPI Bus.
num_bytesThe number of bytes to write to the SPI Bus.
baud_khzThe baud rate at which the SPI Bus should be clocked.

Definition at line 861 of file LTC6804-2.c.

BOOLEAN LTC6804_UVOV_Flags_Get ( int8  board_num,
int16 *  vuv_flags,
int16 *  vov_flags 
)

Gets the LTC6804 flags indicating under-voltage and over-voltage conditions are present.

Returns
TRUE if the LTC6804 communication was successful.
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
vuv_flagsPointer where to return under-voltage flags in a bitmap with bit 0 = cell 0.
vov_flagsPointer where to return over-voltage flags in a bitmap with bit 0 = cell 0.

Definition at line 316 of file LTC6804-2.c.

BOOLEAN LTC6804_UVOV_Thresholds_Get ( int8  board_num,
unsigned int16 *  vuv_value,
unsigned int16 *  vov_value 
)

Gets the LTC6804 under-voltage and over-voltage thresholds in LTC6804_UVOV_RESOLUTION units.

Returns
TRUE if the LTC6804 communication was successful.
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
vuv_valuePointer where to return under-voltage value.
vov_valuePointer where to return over-voltage value.

Definition at line 282 of file LTC6804-2.c.

void LTC6804_UVOV_Thresholds_Set ( int8  board_num,
int16  vuv_value,
int16  vov_value 
)

Sets the LTC6804 under-voltage and over-voltage thresholds in LTC6804_UVOV_RESOLUTION units.

Returns
void
Parameters
board_numThe logical address for the PCB containing this LTC6804-2 IC.
vuv_valueUnder-voltage value.
vov_valueOver-voltage value.

Definition at line 230 of file LTC6804-2.c.

Macro Definition Documentation

#define LTC6804_ADC_CLEAR   0xFFFF

ADC Value returned when results are cleared, but not retaken.

Definition at line 93 of file LTC6804-2.h.

#define LTC6804_ADC_SIZE   sizeof(int16)

16 bit ADC results

Definition at line 189 of file LTC6804-2.h.

#define LTC6804_BAUD_RATE   1000

in kHz, Max input SPI Frequency (1/tCLK from datasheet)

Definition at line 190 of file LTC6804-2.h.

#define LTC6804_BROADCAST   LTC6804_MAX_BOARDS

Code for application code to indicate an LTC6804 command is to be broadcast to all boards.

Definition at line 89 of file LTC6804-2.h.

#define LTC6804_COMMAND_SIZE   2

bytes per command

Definition at line 186 of file LTC6804-2.h.

#define LTC6804_COMMAND_TIME
Value:
BITS_PER_BYTE * US_PER_MS / LTC6804_BAUD_RATE)
#define LTC6804_PEC_SIZE
15 bit PEC, requires int16 data type
Definition: LTC6804-2.h:188
#define LTC6804_BAUD_RATE
in kHz, Max input SPI Frequency (1/tCLK from datasheet)
Definition: LTC6804-2.h:190
#define LTC6804_COMMAND_SIZE
bytes per command
Definition: LTC6804-2.h:186

minimum time necessary to send a command in us

Definition at line 191 of file LTC6804-2.h.

#define LTC6804_CONVERSION_14KHZ_DELAY   230

in us, delay between sampling and reading ADC in 14kHz conversion mode

Definition at line 160 of file LTC6804-2.h.

#define LTC6804_CONVERSION_26HZ_DELAY   34

in ms, delay between sampling and reading ADC in 26Hz conversion mode

Definition at line 164 of file LTC6804-2.h.

#define LTC6804_CONVERSION_27KHZ_DELAY   201

in us, delay between sampling and reading ADC in 27kHz conversion mode

Definition at line 159 of file LTC6804-2.h.

#define LTC6804_CONVERSION_2KHZ_DELAY   754

in us, delay between sampling and reading ADC in 2kHz conversion mode

Definition at line 163 of file LTC6804-2.h.

#define LTC6804_CONVERSION_3KHZ_DELAY   501

in us, delay between sampling and reading ADC in 3kHz conversion mode

Definition at line 162 of file LTC6804-2.h.

#define LTC6804_CONVERSION_7KHZ_DELAY   405

in us, delay between sampling and reading ADC in 7kHz conversion mode

Definition at line 161 of file LTC6804-2.h.

#define LTC6804_CONVERSIONS_ALL_14KHZ_DELAY   1288

in us, delay between sampling and reading ADC in 14kHz conversion mode

Definition at line 166 of file LTC6804-2.h.

#define LTC6804_CONVERSIONS_ALL_26HZ_DELAY   202

in ms, delay between sampling and reading ADC in 26Hz conversion mode

Definition at line 170 of file LTC6804-2.h.

#define LTC6804_CONVERSIONS_ALL_27KHZ_DELAY   11130

in us, delay between sampling and reading ADC in 27kHz conversion mode

Definition at line 165 of file LTC6804-2.h.

#define LTC6804_CONVERSIONS_ALL_2KHZ_DELAY   4430

in us, delay between sampling and reading ADC in 2kHz conversion mode

Definition at line 169 of file LTC6804-2.h.

#define LTC6804_CONVERSIONS_ALL_3KHZ_DELAY   3033

in us, delay between sampling and reading ADC in 3kHz conversion mode

Definition at line 168 of file LTC6804-2.h.

#define LTC6804_CONVERSIONS_ALL_7KHZ_DELAY   2335

in us, delay between sampling and reading ADC in 7kHz conversion mode

Definition at line 167 of file LTC6804-2.h.

#define LTC6804_MAX_BOARDS   16

The maximum number of addresses available to the LTC6804-2.

Definition at line 88 of file LTC6804-2.h.

#define LTC6804_NUM_AUX_ADC   6

Number of auxiliary ADC measurements.

Definition at line 92 of file LTC6804-2.h.

#define LTC6804_NUM_CELLV_ADC   12

Number of cell voltage ADC measurements.

Definition at line 90 of file LTC6804-2.h.

#define LTC6804_NUM_GPIO   5

Number of GPIO pins available on LTC6804.

Definition at line 91 of file LTC6804-2.h.

#define LTC6804_PEC_SIZE   sizeof(int16)

15 bit PEC, requires int16 data type

Definition at line 188 of file LTC6804-2.h.

#define LTC6804_REGISTER_GROUP_SIZE   6

bytes per register group

Definition at line 187 of file LTC6804-2.h.

#define LTC6804_REGISTER_GROUP_TIME
Value:
BITS_PER_BYTE * US_PER_MS / LTC6804_BAUD_RATE)
#define LTC6804_PEC_SIZE
15 bit PEC, requires int16 data type
Definition: LTC6804-2.h:188
#define LTC6804_BAUD_RATE
in kHz, Max input SPI Frequency (1/tCLK from datasheet)
Definition: LTC6804-2.h:190
#define LTC6804_COMMAND_SIZE
bytes per command
Definition: LTC6804-2.h:186
#define LTC6804_REGISTER_GROUP_SIZE
bytes per register group
Definition: LTC6804-2.h:187
#define LTC6804_SOC_RESOLUTION   (20*100)

uV per bit (SOC), sum-of-cells resolution.

Definition at line 178 of file LTC6804-2.h.

#define LTC6804_TREFUP   4400

in us, max reference wakeup time.

Definition at line 158 of file LTC6804-2.h.

#define LTC6804_UVOV_RESOLUTION   (16*100)

uV per bit (VUV and VOV), under-voltage and over-voltage resolution.

Definition at line 177 of file LTC6804-2.h.

#define LTC6804_V_SUPPLY_VOLTAGE   11000

mV per bit, Minimum supply voltage from datasheet page 7.

Definition at line 179 of file LTC6804-2.h.

#define LTC6804_VOLTAGE_RESOLUTION   100

uV per bit (CxV), cell voltage resolution.

Definition at line 176 of file LTC6804-2.h.

Enumeration Type Documentation

Enumerator
LTC6804_CH_ALL 

All Cells.

LTC6804_CH_CELL_1_AND_7 

Cell 1 and Cell 7.

LTC6804_CH_CELL_2_AND_8 

Cell 2 and Cell 8.

LTC6804_CH_CELL_3_AND_9 

Cell 3 and Cell 9.

LTC6804_CH_CELL_4_AND_10 

Cell 4 and Cell 10.

LTC6804_CH_CELL_5_AND_11 

Cell 5 and Cell 11.

LTC6804_CH_CELL_6_AND_12 

Cell 6 and Cell 12.

Definition at line 99 of file LTC6804-2.h.

Enumerator
LTC6804_CHG_GPIO_ALL 

GPIO 1-5, 2nd Ref.

LTC6804_CHG_GPIO1 

GPIO 1.

LTC6804_CHG_GPIO2 

GPIO 2.

LTC6804_CHG_GPIO3 

GPIO 3.

LTC6804_CHG_GPIO4 

GPIO 4.

LTC6804_CHG_GPIO5 

GPIO 5.

LTC6804_CHG_GPIO_2ND_REF 

2nd Reference

Definition at line 114 of file LTC6804-2.h.

Enumerator
LTC6804_CHST_ALL 

SOC, ITMP, VA, VD.

LTC6804_CHST_SOC 

SOC.

LTC6804_CHST_ITMP 

ITMP.

LTC6804_CHST_VA 

VA.

LTC6804_CHST_VD 

VD.

Definition at line 129 of file LTC6804-2.h.

Enumerator
LTC6804_CONVERSION_27KHZ_MODE 

27kHz conversion mode

LTC6804_CONVERSION_14KHZ_MODE 

14kHz conversion mode

LTC6804_CONVERSION_7KHZ_MODE 

7kHz conversion mode

LTC6804_CONVERSION_3KHZ_MODE 

3kHz conversion mode

LTC6804_CONVERSION_2KHZ_MODE 

2kHz conversion mode

LTC6804_CONVERSION_26HZ_MODE 

26Hz conversion mode

Definition at line 142 of file LTC6804-2.h.