333KB

The following document contains information on Cypress products.
Colophon
The products described in this document are designed, developed and manufactured as contemplated for general use,
including without limitation, ordinary industrial use, general office use, personal use, and household use, but are not
designed, developed and manufactured as contemplated (1) for any use that includes fatal risks or dangers that, unless
extremely high safety is secured, could have a serious effect to the public, and could lead directly to death, personal injury,
severe physical damage or other loss (i.e., nuclear reaction control in nuclear facility, aircraft flight control, air traffic control,
mass transport control, medical life support system, missile launch control in weapon system), or (2) for any use where
chance of failure is intolerable (i.e., submersible repeater and artificial satellite). Please note that Spansion will not be liable
to you and/or any third party for any claims or damages arising in connection with above-mentioned uses of the products.
Any semiconductor devices have an inherent chance of failure. You must protect against injury, damage or loss from such
failures by incorporating safety design measures into your facility and equipment such as redundancy, fire protection, and
prevention of over-current levels and other abnormal operating conditions. If any products described in this document
represent goods or technologies subject to certain restrictions on export under the Foreign Exchange and Foreign Trade Law
of Japan, the US Export Administration Regulations or the applicable laws of any other country, the prior authorization by the
respective government entity will be required for export of those products.
Trademarks and Notice
The contents of this document are subject to change without notice. This document may contain information on a Spansion
product under development by Spansion. Spansion reserves the right to change or discontinue work on any product without
notice. The information in this document is provided as is without warranty or guarantee of any kind as to its accuracy,
completeness, operability, fitness for particular purpose, merchantability, non-infringement of third-party rights, or any other
warranty, express, implied, or statutory. Spansion assumes no liability for any damages of any kind arising out of the use of
the information in this document.
®
®
®
TM
Copyright © 2013 Spansion Inc. All rights reserved. Spansion , the Spansion logo, MirrorBit , MirrorBit Eclipse ,
TM
ORNAND and combinations thereof, are trademarks and registered trademarks of Spansion LLC in the United States and
other countries. Other names used are for informational purposes only and may be trademarks of their respective owners.
Fujitsu Semiconductor Design (Chengdu) Co., Ltd.
Application Note
MCU-AN-500100-E-10
F²MC-8FX FAMILY
8-BIT MICROCONTROLLER
MB95200H/210H SERIES
BATTERY CHARGER
REFERENCE SOLUTION
APPLICATION NOTE
Battery Charger V1.0.0
Revision History
Revision History
Version
Date
Updated by
Modifications
1.0.0
9/27/2010
Lori Li
First Draft
This manual contains 14 pages.
1. The products described in this manual and the specifications thereof may be changed without prior notice.
To obtain up-to-date information and/or specifications, contact your Fujitsu sales representative or Fujitsu
authorized dealer.
2. Fujitsu will not be liable for infringement of copyright, industrial property right, or other rights of a third party
caused by the use of information or drawings described in this manual.
3. The contents of this manual may not be transferred or copied without the express permission of Fujitsu.
4. The products contained in this document are not intended for use with equipment which require extremely
high reliability such as aerospace equipment, undersea repeaters, nuclear control systems or medical
equipment for life support.
5. Some of the products described in this manual may be strategic materials (or special technology) as defined
by the Foreign Exchange and Foreign Trade Control Law. In such cases, the products or portions theory
must not be exported without permission as defined under the law.
© 2010 Fujitsu Semiconductor Design (Chengdu) Co., Ltd.
MCU-AN-500100-E-10 – Page 2
Battery Charger V1.0.0
CONTENTS
CONTENTS
REVISION HISTORY .............................................................................................................. 2 CONTENTS ............................................................................................................................ 3 1 INTRODUCTION ................................................................................................................ 4 2 DEMO PLATFORM............................................................................................................ 5 2.1 Platform ..................................................................................................................... 5 3 FEATURES ........................................................................................................................ 6 3.1 Battery Insertion Detection ........................................................................................ 6 3.2 Support 2, 3 and 4 Cell Battery Pack ........................................................................ 6 3.3 Support Setting Charger Voltage .............................................................................. 6 3.4 Support Setting Charger Current .............................................................................. 6 3.5 LED Display the Charger Status ............................................................................... 7 4 HARDWARE ...................................................................................................................... 8 4.1 System Block Diagram .............................................................................................. 8 4.2 Schematic ................................................................................................................. 9 4.3 MCU Pin Assignment .............................................................................................. 10 5 FIRMWARE...................................................................................................................... 11 5.1 Flowchart ................................................................................................................ 11 5.2 Firmware Project ..................................................................................................... 12 6 ADDITIONAL INFORMATION ......................................................................................... 13 7 APPENDIX ....................................................................................................................... 14 7.1 List of Figures and Tables ....................................................................................... 14 MCU-AN-500100-E-10 – Page 3
Battery Charger V1.0.0
Chapter 1 Introduction
1 Introduction
Power Tool Battery Charger Demo Board is used to charge the battery of handset. The
battery charger solution is based on LPC MCU MB95F223K and MB39A132. MB95F223K is
a SOP16 package MCU, which integrates composite timer, 8/10 A/D converter on chip. The
MB39A132 is a DC/DC converter IC for charging Li-ion battery.
This demo set supports features below:
Battery insertion detection
2, 3 and 4 cell battery pack
Setting charger voltage
Setting charger current
LED display the charger status
MCU-AN-500100-E-10 – Page 4
Battery Charger V1.0.0
Chapter 2 Demo Platform
2 Demo Platform
Demo Platform of Battery Charger
2.1
Platform
Figure 2-1 shows the demo platform of battery charger. The red and green LEDs show the
charger status.
Figure 2-1 Demo Platform
MCU-AN-500100-E-10 – Page 5
Battery Charger V1.0.0
Chapter 3 Features
3 Features
Features of Battery Charger
3.1
Battery Insertion Detection
When battery insertion is detected, the charger checks the voltage and temperature of the
inserted battery. The charger is stopped if it is abnormal.
Charger stops the charge process and the red LED starts to flash when charger detects that
battery type is unmatched. Charger continues the charge process when a new battery is
inserted.
3.2
Support 2, 3 and 4 Cell Battery Pack
Adjusting R11 and R12 can change the number of charger cell.
When R11 is unconnected and R12 is 0Ω, the charger supports 2 cells.
When R11 is unconnected and R12 is unconnected, the charger supports 3 cells.
When R11 is 0Ω and R12 is unconnected, the charger supports 4 cells.
The demo current status supports 3 cells.
3.3
Support Setting Charger Voltage
Upon the setting of cell number, R9 and R10 can be adjusted to change the charge voltage.
When NADJ3 >= 0.82, one cell charge voltage is 4.20V.
When 0.48<= NADJ3 <= 0.78, one cell charge voltage is 4.35V.
When 0 <= NADJ3 <= 0.18, one cell charge voltage is 4.00V.
When 0.22 <= NADJ3 <= 0.44, one cell charge voltage is 2×5×NADJ3V.
Now the demo R9 is 2K and R10 is 12K, one cell charge voltage is 4.2V and the charger
voltage is 12.6V.
3.4
Support Setting Charger Current
Upon above setting, R15 and R16 can be adjusted to change the upper limit of charge
current.
When NADJ2 >= 0.92, the upper limit of charge current is 2.85A.
When 0 <= NADJ2 <= 0.88, the upper limit of charge current is 2× (5×NADJ2-0.075) A.
Now the demo R15 is 100K and R16 is 24K, the upper limit of charge current is 1.8A.
MCU-AN-500100-E-10 – Page 6
Battery Charger V1.0.0
Chapter 3 Features
3.5
LED Display the Charger Status
The demo has two LEDs: green LED and red LED.
The green LED keeps on showing that the charger enters standby mode when charging is
started or the battery is fully charged.
The green light flashes to show that the charger is charging.
The red LED keeps on showing that the charger detects an overtemperature in battery.
The red LED flashes to show that the battery is unmatched.
Charger stops the charge process when the red LED lights on or flash. Charger continues
the charge process when a new battery is inserted or resumes to normal status.
MCU-AN-500100-E-10 – Page 7
Battery Charger V1.0.0
Chapter 4 Hardware
4 Hardware
Hardware of Battery Charger
4.1
System Block Diagram
Figure 4-1 shows the demo system block diagram. The demo charger is developed based
on MCU MB95F223K and MB39A132.
MCU: AD module, switch control module and LED signal module
DC input
Charge manager
LED
Battery
Figure 4-1 System Block Diagram
MCU-AN-500100-E-10 – Page 8
Battery Charger V1.0.0
Chapter 4 Hardware
4.2
Schematic
Figure 4-2 shows the schematic.
Figure 4-2 Battery Charger
MCU-AN-500100-E-10 – Page 9
Battery Charger V1.0.0
Chapter 4 Hardware
4.3
MCU Pin Assignment
Table 4-1 shows the MB95F223K pin assignment in this system.
Table 4-1 Pin Assignment
Function
Pin Number
Pin
10
P01/INT01
AD input, VOUT
9
P02/INT02
AD input, CURRENT_DETECT
11
P03/INT03
AD input, BATTERY_DETECT
12
P04/INT04
AD input, TEMP_DETECT
13
P05/INT05
LED output, Green LED
14
P06/INT06
LED output, Red LED
15
P07/INT07
Switch output
MCU-AN-500100-E-10 – Page 10
Battery Charger V1.0.0
Chapter 5 Firmware
5 Firmware
Firmware of Battery Charger
5.1
Flowchart
MCU initializes the on-chip peripherals and initializes the system parameters when the
battery is detected and battery temperature is normal.
When above status is normal, the system will entry charging process and continue to check
the battery status and temperature.
When the battery is fully charged, the charge process stops.
The description of main loop function is shown in Figure 5-1.
Start
System initialization and green led on
Check Battery status ready?
N
Y
Check Temp status ready?
N
Y
Enter charge and green led flash
Y
N
Check Battery status ready?
Y
Check Temp status ready?
N
Y
Check Battery fully?
Y
Stop charge and green led on
Figure 5-1 Main Loop Flowchart
MCU-AN-500100-E-10 – Page 11
N
Battery Charger V1.0.0
Chapter 5 Firmware
5.2
Firmware Project
This demo uses MB95F223K to implement all the functions. MB2146-08-E and SOFTUNE
V3 are used to debug the demo.
The table below explains the functions of the main files.
Files
Table 5-1 Battery Charger Function
Function
ad.c
Detect battery type, temperature, current and voltage
Global.c
Define global variable
Handle.c
Function module
Main.c
Main function
Ma95200.asm
FUJITSU MCU head file
Startup.asm
MCU configure file
Timer0.c
System clock function
Vecter.c
Interrupt setting file
The project is shown in Figure 5-2 Demo Project.
Figure 5-2 Demo Project
MCU-AN-500100-E-10 – Page 12
Battery Charger V1.0.0
Chapter 6 Additional Information
6 Additional Information
For more Information on FUJITSU Semiconductor products, visit the following websites:
English version:
http://www.fujitsu.com/cn/fsp/services/mcu/mb95/application_notes.html
Simplified Chinese Version:
http://www.fujitsu.com/cn/fss/services/mcu/mb95/application_notes.html
MCU-AN-500100-E-10 – Page 13
Battery Charger V1.0.0
Chapter 7 Appendix
7 Appendix
7.1
List of Figures and Tables
Table 4-1 Pin Assignment ...................................................................................................... 10 Table 5-1 Battery Charger Function....................................................................................... 12 Figure 2-1 Demo Platform ........................................................................................................ 5 Figure 4-1 System Block Diagram ........................................................................................... 8 Figure 4-2 Battery Charger ...................................................................................................... 9 Figure 5-1 Main Loop Flowchart ............................................................................................ 11 Figure 5-2 Demo Project ........................................................................................................ 12 MCU-AN-500100-E-10 – Page 14