AN137 Silicon_Laboratories, AN137 Datasheet - Page 31

no-image

AN137

Manufacturer Part Number
AN137
Description
Lithium ION Battery Charger Using C8051f300
Manufacturer
Silicon_Laboratories
Datasheet
CONST_C = 1;
DELAY
temp = Monitor_Battery(TEMPERATURE);
if ((temp > MIN_TEMP_ABS) && (temp < MAX_TEMP_ABS))
{
temp = Monitor_Battery(VOLTAGE);
if ((temp <= (MAX_VOLT_ABS + VOLT_TOLERANCE)) && temp > MIN_VOLT_BULK)
{
PCA0CPM0 = 0x42;
// Enter main loop in Bulk_Charge()
while ((BULK == 1) && (ERROR == 0))
{
{
if (CONST_C == 1)
else if (CONST_V == 1)
// Now, Check for error and charge termination conditions
// If above max charge time, flag error
// Test for BULK Charge Time Out
if ((TIME.hour == bulk_finish_hour) && (TIME.min == bulk_finish_min)
{
}
temp = Monitor_Battery(TEMPERATURE);
if ((temp < MIN_TEMP_ABS) && (temp > MAX_TEMP_ABS))
if (temp < MIN_TEMP_ABS)
}
if (TIME.min != last_min)
{
= 0;
Regulate_Current(I_BULK);
Regulate_Voltage();
Turn_PWM_Off();
TIME_MAX = 1;
ERROR
Turn_PWM_Off();
else
ERROR
last_min = TIME.min;
if ((CONST_V == 1) && (DELAY == 0) && (Monitor_Battery(CURRENT)
&&
TEMP_MIN = 1;
TEMP_MAX = 1;
<= MIN_I_BULK))
(DELAY == 0))
= 1;
= 1;
// Start in constant current charge mode
// Reset timer DELAY
// Monitor Temperature
// Is temperature within range?
// Monitor Voltage
// Is Voltage within range?
// Configure CCM0 to 8-bit PWM mode
// Charge with Constant Current
// Charge with Constant Voltage
// Monitor Time
// Turn Off PWM
// Set Time max error flag
// Set general error flag
// Monitor Temperature
// Turn Off PWM
// Set Temperature below minimum flag
// Set Temperature exceeds maximum flag
// Set general error flag
// Minute elapsed?
// Check for minimum current
// if reached, enter last DELAY charge
Rev. 1.2
AN137
31

Related parts for AN137