bq24725
1、当使用适配器供电时,能够正确读出各寄存器里的值,但当把适配器断开用电池供电时,所有寄存器的值都显示65535,这是为什么?
2、当给电池充电的时候,为什么与电池连接的接口电压不是我设置的充电电压,而是0.82V左右?
以下是我的程序
int main(void)
{
u16 ID;
u16 Charge_Current,Charge_Voltage,Charge_Option,Input_Current;
delay_init();
uart_init(9600);
POWER_Init();
POWER_Write_2Byte(ChargeOption,0xF902);
POWER_Write_2Byte(InputCurrent,0x1100);
POWER_Write_2Byte(ChargeCurrent,0x0800);
POWER_Write_2Byte(ChargeVoltage,0x3600);
while(1)
{
POWER_Write_2Byte(InputCurrent,0x0400);
POWER_Write_2Byte(ChargeCurrent,0x0800);//2000mA
POWER_Write_2Byte(ChargeVoltage,0x30F0);//12.6V
ID=POWER_Read_2Byte(DeviceID);
Charge_Option=POWER_Read_2Byte(ChargeOption);
Charge_Current=POWER_Read_2Byte(ChargeCurrent);
Charge_Voltage=POWER_Read_2Byte(ChargeVoltage);
Input_Current=POWER_Read_2Byte(InputCurrent);
printf("%d",ID);
delay_ms(100);
printf("%d",Charge_Option);
delay_ms(100);
printf("%d",Charge_Current);
delay_ms(100);
printf("%d",Charge_Voltage);
delay_ms(100);
printf("%d",Input_Current);
delay_ms(1000);
}
}
亲;你的电路是咋连的?
在附件里,谢谢