English
Language : 

SM3320-BATT-EV-NOPB Datasheet, PDF (13/21 Pages) Texas Instruments – AN-2121 SolarMagic™ SM3320-BATT-EV Charge Controller Reference Design
www.ti.com
Microcontroller Program Code
14 Microcontroller Program Code
The flowchart in Figure 17 is representative of the code programmed inside the microcontroller.
The check_lead_acid function issues a value depending on the state of the battery as detected by the
voltage. The main function uses this value to issue the proper action. The other functions in the program
are essentially I2C driver functions and low level port setup functions.
Initialization
Wait
Release SM72442
Reset
Engage SM72442
Reset
Set SM72442
Output Voltage to
14.3V
Defective battery
or no batter
Yes
Vbatt>14.5V?
No
Vbatt<8V?
Yes
No
Vbatt>14.2V?
No
Vbatt<10V?
No
Yes
Set voltage to
13.5V
Yes
Set low current
limit
Set high current
limit
Figure 17. Microcontroller Code Flowchart
SNOSB76C – December 2010 – Revised May 2013
AN-2121 SolarMagic™ SM3320-BATT-EV Charge Controller Reference
13
Submit Documentation Feedback
Design
Copyright © 2010–2013, Texas Instruments Incorporated