Analog Devices DC2792B Скачать руководство пользователя страница 14

14

DEMO MANUAL DC2515A

Rev. 0

APPENDIX A: THE SKETCHBOOK CONTENTS

The bmsSketchbook will generally contain the follow-

ing folders: Libraries, Part Number, Documentation, 

and Utilities.

Libraries directory:

 contains a subdirectory for each IC 

in the sketchbook. Each subdirectory contains a .cpp and 

.h file. These files contain all of the constant definitions 

and low-level IC command implementations. Porting to 

a different microcontroller requires changes to some 

library files.

Part Number directory:

 contains example control pro-

grams for each IC. Inside the Part Number folder, each 

BMS IC has a sketch(.ino) file that implements a control 

program to evaluate the functionality of the IC. This sketch 

allows the user to control the IC through a serial terminal 

and make all primary measurements. This sketch also 

allows for evaluation of self-test and discharge features 

of the IC. Generally, the name of a sketch relates to the 

IC’s demo board. For example, the sketch for LTC6804 

is DC1942.ino, for LTC6811 it is DC2259.ino, and for 

LTC6810 it is DC2515_New.ino.

Utilities directory:

 contains support programs, including 

a program that emulates a standard Linear Technology 

DC590 isolated USB to serial controller.

Documentation directory:

 contains html documentation 

for the provided code base. Documentation for all of the 

BMS ICs can 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 microcontroller/

Linduino program. The term is generally only used when 

referring to Arduino based programs, as sketches have 

several abstractions that remove some of the complex-

ity of a standard microcontroller(MCU) program. All 

sketches contains two primary functions, the setup() and 

the loop() function. These are in fact the only functions 

that are mandatory in a sketch and are almost always 

implemented in some form in a typical MCU program. The 

setup() function is run once at power on or after the MCU 

is reset. The setup() function generally is used to initial-

ize the MCU peripheral circuits and to initialize all of the 

control variables. The loop() function is similar to a main() 

function that has implemented an infinite loop inside a 

standard C program. The code within the loop() function 

is typically where the primary program code is placed. 

The code within the loop() function will repeat infinitely.

Sketch Modifications

Sketches can be modified to a set of applications spe-

cific requirements. All sketches are written such that the 

most common modifications can be made by changing 

the variables listed in the /*Setup Variables */ table at the 

top of the sketch. For reference, example modifications 

to a DC2259 (LTC6811) sketch are shown below. These 

modifications are applicable to most of the available BMS 

ICs in the sketchbook.

Содержание DC2792B

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Отзывы: