码迷,mamicode.com
首页 > 移动开发 > 详细

移动电源频率设置

时间:2015-05-08 12:47:48      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:

//300k频率下的值str
#define CHARGE_FULL_MAX_SCALE 226

#define CHARGE12V_START_SCALE 184
#define CHARGE12V_MAX_SCALE 184
#define CHARGE12V_MINI_SCALE 155
#define CHARGE12V_DEADLINE 5

#define CHARGE9V_START_SCALE 173
#define CHARGE9V_MAX_SCALE 173
#define CHARGE9V_MINI_SCALE 120
#define CHARGE9V_DEADLINE 5

#define CHARGE5V_START_SCALE 88
#define CHARGE5V_MAX_SCALE 88
#define CHARGE5V_MINI_SCALE 7
#define CHARGE5V_DEADLINE 5

#define DISCHARGE_START_SCALE 22
#define DISCHARGE_MAX_SCALE 150
#define DISCHARGE_MINI_SCALE 22
#define DISCHARGE_DEADLINE 17
//end

 

 

 

/*//100kHz周期值719下对应的占空比
#define CHARGE_FULL_MAX_SCALE 681

#define CHARGE12V_START_SCALE 555 //逐渐减小
#define CHARGE12V_MAX_SCALE 555 //
#define CHARGE12V_MINI_SCALE 465
#define CHARGE12V_DEADLINE 15

#define CHARGE9V_START_SCALE 520 //逐渐减小
#define CHARGE9V_MAX_SCALE 520 //
#define CHARGE9V_MINI_SCALE 360
#define CHARGE9V_DEADLINE 15

#define CHARGE5V_START_SCALE 266
#define CHARGE5V_MAX_SCALE 266 //
#define CHARGE5V_MINI_SCALE 21
#define CHARGE5V_DEADLINE 15

#define DISCHARGE_START_SCALE 66//逐渐增大
#define DISCHARGE_MAX_SCALE 450
#define DISCHARGE_MINI_SCALE 65
#define DISCHARGE_DEADLINE 50

 

 

//ovp设置

//过压保护 充电13V PA0输入
 OVPEN = 0x0f;//pwm0 A,B两路硬件刹车打开+3个滤波
 OVPMUX = 0x39;//外部参考电压+比较点 对应13V

 

//过压保护 放电6V PA0输入
OVPEN = 0x0f;//pwm0 A,B两路硬件刹车打开+3个滤波
OVPMUX = 0x19;//外部参考电压+比较点 对应6V

移动电源频率设置

标签:

原文地址:http://www.cnblogs.com/fx427103/p/4487116.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!