Analog Devices DC2792B Demo Manual Download Page 15

15

DEMO MANUAL DC2515A

Rev. 0

APPENDIX A: THE SKETCHBOOK CONTENTS

Common modifications can be made by changing the 

Setup Variables. The most common application changes 

are listed below. After the variables are changed, the 

sketch will need to be recompiled and uploaded to the 

Linduino.
1. To change the number of ICs in the isoSPI network, 

change the TOTAL_IC variable. A number between 1 

and 4 should be entered. In an application that has 2 

devices in the network the modified line will look like:

const uint8_t TOTAL_IC = 2;

2. Often an application may need to sample data at a rate 

faster than the default 500ms (2Hz). To modify the loop/

sample rate the MEASUREMENT_LOOP_TIME variable 

should be changed. The loop time must be entered in 

milliseconds and should be a number larger than 20mS. 

To change the loop rate to roughly 10 measurements 

a second the loop rate should be changed to 100mS. 

The modified line will look like:

const uint16_t MEASUREMENT_LOOP_TIME = 100;

3. It is possible to modify which measurements fall within 

the loop during the Loop Measurements command. The 

following list are the measurements that can be looped:

const uint8_t MEASURE_CELL = ENABLED;

// This is ENABLED or DISABLED

const uint8_t MEASURE_AUX = DISABLED;

// This is ENABLED or DISABLED

const uint8_t MEASURE_STAT = DISABLED;

//This is ENABLED or DISABLED

  By default only a cell measurement is done, as noted by 

MEASURE_CELL = ENABLED. What measurements are 

made can be changed by setting what the Measure field 

is equal to. To Measure Cells and the Status register 

but not the AUX register, the variables would be setup 

as shown below:

const uint8_t MEASURE_CELL = ENABLED;

// This is ENABLED or DISABLED

const uint8_t MEASURE_AUX = DISABLED;

// This is ENABLED or DISABLED

const uint8_t MEASURE_STAT = ENABLED;

//This is ENABLED or DISABLED

4. ADC conversion settings can also be modified in the 

Setup Variables section. The default setup is to run the 

ADC in ‘Normal’ mode, which has a 7kHz filter code; 

in  this  mode  the  ADC_OPT  bit  is  Disabled.  Typical 

choice  for  which  cell  to  convert  is  ALL.  Full  ADC 

conversion programming requires setting ADC_OPT, 

ADC_CONVERSION_MODE, CELL_CH_TO_CONVERT, 

AUX_CH_TO_CONVERT, and STAT_CH_TO_CONVERT. 

These variables are programmed with constants listed 

in the LTC68xy_daisy.h file. For simplicity they are also 

listed below:

MD_422HZ_1KHZ

MD_27KHZ_14KHZ

MD_7KHZ_3KHZ

MD_26HZ_2KHZ

ADC_OPT_ENABLED

ADC_OPT_DISABLED

CELL_CH_ALL

CELL_CH_1and7

CELL_CH_2and8

CELL_CH_3and9

CELL_CH_4and10

CELL_CH_5and11

CELL_CH_6and12

  To set the ADC to have a 1kHz filter corner the ADC_OPT 

and  ADC_CONVERSION_MODE  variables  would  be 

changed to:

ADC_OPT = ADC_OPT_ENABLED;

ADC_CONVERSION_MODE = MD_422HZ_1KHZ;

  To convert only cells 2 and 8,

CELL_CH_TO_CONVERT = CELL_CH_2and8;

5. In another example, the user may wish to change the 

undervoltage and overvoltage thresholds. Each number 

is based on an LSB of 100 µV.

//Under Voltage and Over Voltage Thresholds

const uint16_t OV_THRESHOLD = 41000;

// Over voltage threshold ADC Code. LSB = 0.0001

const uint16_t UV_THRESHOLD = 30000;

// Under voltage threshold ADC Code. LSB = 0.0001

Summary of Contents for DC2792B

Page 1: ...ective owners PERFORMANCE SUMMARY to control the battery stack monitor IC and receive data through a USB serial port The DC2026C provides a stan dard SPI interface which can be connected directly to a...

Page 2: ...in Table 1 Alternatively resistors can be used to simulate battery cell voltages 100 0 5W or equivalent resistors are rec ommended because 100 or lower values typically will not induce measurement err...

Page 3: ...nected as a typical single ended isoSPI bus master or to both ends of a reversible configuration with two isoSPI bus masters The DC1941 can be connected as a typical single ended isoSPI bus master Wh...

Page 4: ...sy chain the DC2515 to another DC2515 in isoSPI mode This DC2515 is the last or top board of a two board stack More DC2515 upper boards can be daisy chained together in the same manner a Connect a RJ4...

Page 5: ...on c JP3 can be 0 or 1 depending if the Discharge Timer function is being used 4 Connect or daisy chain the DC2515 to another DC2515 inisoSPImode ThisDC2515isthelast or top board ofatwo boardstack Mor...

Page 6: ...can be 0 or 1 depending if the Discharge Timer function is being used 4 Connect or daisy chain the DC2515 to another DC2515 in isoSPI mode This DC2515 is the first or bottom board of a two board stack...

Page 7: ...JP4 to 1 for isoSPI communication c JP3 can be 0 or 1 depending if the Discharge Timer function is being used 4 Connect or daisy chain the DC2515 to another DC2515 inisoSPImode ThisDC2515isthelast or...

Page 8: ...ls Figure 6 shows the proper board settings 1 JP2 VCC DC590 2 JP3 ENABLE EN 3 JP4 SLOW 0 4 JP5 MODE MASTER 5 JP6 VCCS VCC 6 JP7 PHA 1 7 JP8 POL 1 8 JP9 JP10 VTH VTH2 Figure 6 DC1941 isoSPI Master Mode...

Page 9: ...C2515 JP1 JP2 and JP4 to 1 for isoSPI communication c JP3 can be 0 or 1 depending if the Discharge Timer function is being used 5 Connect or daisy chain the DC2515 to another DC2515 inisoSPImode ThisD...

Page 10: ...JP2 and JP4 to 1 for isoSPI communication c JP3 can be 0 or 1 depending if the Discharge Timer function is being used 5 Connect or daisy chain the DC2515 to another DC2515 in isoSPI mode This DC2515...

Page 11: ...r IC open drain SDO and an easy ribbon cable connection for SPI communication through the DC2515 14 pin QuikEval J4 connector Arduino IDE Setup 1 Download then install the Arduino IDE onto the PC Deta...

Page 12: ...n DC2026 is usually the highest COM port number The PC screenshots used in this example show the DC2026 connected toCOM6 5 Select the correct Arduino compatible microcontroller board Under the Tools m...

Page 13: ...top right corner then the Serial Monitor window will open and show on the top left corner the COMxx used 9 Configure the Serial Monitor to allow communication to the DC2026 through USB On the bottom o...

Page 14: ...an be accessed by opening the Linduino html file as found in the main sketchbook directory shown below and in the Documentation directory What Is A Sketch A sketch is simply another word for a microco...

Page 15: ...ed by setting what the Measure field is equal to To Measure Cells and the Status register but not the AUX register the variables would be setup as shown below const uint8_t MEASURE_CELL ENABLED This i...

Page 16: ...isclose or transfer any portion of the Evaluation Board to any other party for any reason Upon discontinuation of use of the Evaluation Board or termination of this Agreement Customer agrees to prompt...

Reviews: