《LTC具温度电压和电流测量功能的多节电池电量测量芯片》由会员分享,可在线阅读,更多相关《LTC具温度电压和电流测量功能的多节电池电量测量芯片(20页珍藏版)》请在金锄头文库上搜索。
1、LTC2943-具温度、电压和电流测量功能的多节电池电量测量芯片特点可测量累积的电池充电和放电电量至20V工作范围可适合多种电池应用14位ADC负责测量电池电压、电流和温度1%电压、电流和充电准确度=t50mV检测电压范围高压侧检测适合任何电池化学组成和容量的通用测量I2C/SMBus接口可配置警报输出/充电完成输入静态电流小于120aA小外形8引脚3mmx3mmDFN封装CHARGER-MULT忙El I LHON典型应用ITC2943SENSE*ALGGSDASENSE-SCLGN口T工SMWImTotalChargeErrorvsDifferentialSenseVoltage(%) H
2、0HHLU山 5WHOOJ110100sense(mV)294aTAOIt描述LTC?2943?可测量便携式产品应用中的电池充电状态、电池电压、电池电流及其自身温度。其具有宽输入电压范围,因而可与高达?20V?的多节电池配合使用。一个精准的库仑计量器负责对流经位于电池正端子和负载或充电器之间的一个检测电阻器电流进行积分运算。电池电压、电流和温度利用一个内部?14位无延迟增量累加?(NoLatencyATM)ADC?来测量。测量结果被存储于可通过内置?I2C/SMBus?接口进行存取的内部寄存器中。LTC2943?具有针对所有?4阴中测量物理量的可编程高门限和低门限。如果超过了某个编程门限,则该
3、器件将采用?SMBus?警报协议或通过在内部状态寄存器中设定一个标记来传送警报信号。LTC2943?仅需采用单个低阻值检测电阻器以设定测量电流范围。应用电动工具电动自行车便携式医疗设备视频摄像机程序:#include#include#include#include#include#include#include#include00;CheckI2CAddress.;Sharedbetweenloop()andrestore_alert_settings().nPleaseensureI2ClinesofLinduinoareconnectedtotheLTCdevice);(ack_error
4、);(F(*);print_prompt();*n);(F(*Setthebaudrateto115200andselectthenewlineterminator.*n);(F(*n);n);int8_tmenu_1_automatic_mode(int8_tmAh_or_Coulombs,int8_tcelcius_or_kelvin,uint16_tprescalar_mode,uint16_tprescalarValue,uint16_talcc_mode)0=acknowledge,1=noacknowledge.int8_tLTC2943_mode;int8_tack=0;LTC2
5、943_mode=LTC2943_AUTOMATIC_MODE|prescalar_mode|alcc_mode;();ack|=LTC2943_write(LTC2943_I2C_ADDRESS,LTC2943_CONTROL_REG,LTC2943_mode);(Coulombs:);(charge,4);(F(Cn);elsecharge=LTC2943_code_to_mAh(charge_code,resistor,prescalarValue);(mAh:);(charge,4);(F(mAhn);current=LTC2943_code_to_current(current_co
6、de,resistor);IfanAlerthasbeenset,printoutappropriatemessageintheSerialPrompt.(F(m-MainMenunn);();delay(AUTOMATIC_MODE_DISPLAY_DELAY);read_int();0=acknowledge,1=noacknowledgeint8_tLTC2943_mode;int8_tack=0;LTC2943_mode=LTC2943_SCAN_MODE|prescalar_mode|alcc_mode;();ack|=LTC2943_write(LTC2943_I2C_ADDRES
7、S,LTC2943_CONTROL_REG,LTC2943_mode);(Coulombs:);(charge,4);(F(Cn);elsecharge=LTC2943_code_to_mAh(charge_code,resistor,prescalarValue);(mAh:);(charge,4);(F(mAhn);current=LTC2943_code_to_current(current_code,resistor);(F(Temperature);(temperature,4);(F(Kn);elsetemperature=LTC2943_code_to_celcius_tempe
8、rature(temperature_code);(F(Temperature);(temperature,4);(F(Cn);checkAlerts(status_code);IfanAlerthasbeenset,printoutappropriatemessageintheSerialPrompt(F(m-MainMenunn);();delay(SCAN_MODE_DISPLAY_DELAY);while()=false|(ack);read_int();0=acknowledge,1=noacknowledgeint8_tLTC2943_mode;int8_tack=0;LTC294
9、3_mode=LTC2943_MANUAL_MODE|prescalar_mode|alcc_mode;();ack|=LTC2943_write(LTC2943_I2C_ADDRESS,LTC2943_CONTROL_REG,LTC2943_mode);Whensetto1itindicatesthatstaledataisbeingreadfromthevoltage,currentandtemperatureregisters.do(F(”*nn);uint8_tstatus_code;uint16_tcharge_code,current_code,voltage_code,tempe
10、rature_code;ack|=LTC2943_read_16_bits(LTC2943_I2C_ADDRESS,LTC2943_ACCUM_CHARGE_MSB_REG,&charge_code);(Coulombs:);(charge,4);(F(Cn);elsecharge=LTC2943_code_to_mAh(charge_code,resistor,prescalarValue);(mAh:);(charge,4);(F(mAhn);current=LTC2943_code_to_current(current_code,resistor);else();(F(Voltage);
11、(voltage,4);(F(V);if(staleData)(F(*StaleData*n);else();if(celcius_or_kelvin)temperature=LTC2943_code_to_kelvin_temperature(temperature_code);(F(Temperature);(temperature,4);(F(K);elsetemperature=LTC2943_code_to_celcius_temperature(temperature_code);(F(Temperature);(temperature,4);(F(C);if(staleData)
12、(F(*StaleData*n);else();checkAlerts(status_code);IfanAlerthasbeenset,printoutappropriatemessageintheSerialPrompt(F(m-MainMenunn);staleData=1;();delay(AUTOMATIC_MODE_DISPLAY_DELAY);while()=false|(ack);read_int();0=acknowledge,1=noacknowledgeint8_tLTC2943_mode;int8_tack=0;LTC2943_mode=LTC2943_SLEEP_MO
13、DE|prescalar_mode|alcc_mode;();ack|=LTC2943_write(LTC2943_I2C_ADDRESS,LTC2943_CONTROL_REG,LTC2943_mode);(Coulombs:);(charge,4);(F(Cn);elsecharge=LTC2943_code_to_mAh(charge_code,resistor,prescalarValue);(mAh:);(charge,4);(F(mAhn);(F(Current);(F(ADCSleep.n);(F(Voltage);(F(ADCSleep.n);(F(Temperature);(
14、F(ADCSleep.n);(F(m-MainMenunn);checkAlerts(status_code);();delay(AUTOMATIC_MODE_DISPLAY_DELAY);while()=false|(ack);read_int();0=acknowledge,1=noacknowledgeint8_tack=0;ack|=LTC2943_write(LTC2943_I2C_ADDRESS,LTC2943_CONTROL_REG,LTC2943_SHUTDOWN_MODE);0=acknowledge,1=noacknowledgeint8_tack=0;int8_tuser_command;do(F(”*nn);(F(1-SetAlertThresholdsn);(F(2-S