常驻嘉宾
freefly
- 积分
- 5459
- 威望
- 2762
- 贡献
- 1277
- 兑换币
- 1323
- 注册时间
- 2013-4-28
- 在线时间
- 710 小时
|
wanbinqs 发表于 2013-7-7 07:59
嗯嗯 是S128,级联我再看看,谢谢你。痛苦了一天了 我们进度比较慢 考完试在猛赶,起步太晚 ...
PWME_PWME4 =0;
PWME_PWME5 =0; //close pwm0123
PWMSCLA=5;//3; //Clock SA = Clock A / (2 * PWMSCLA) ??SA?1Mhz
PWMSCLB=5; //Clock SB = Clock B / (2 * PWMSCLB) ??SB?1Mhz
PWMCAE_CAE4 =0; //left align, low level first
PWMPOL_PPOL4 =0;
PWMCAE_CAE5 =0;
PWMPOL_PPOL5 =0;
PWMCNT4 =0; //clear counter
PWMCNT5 =0;
PWMCLK_PCLK4 =1; // clockSA????1Mhz
PWMCLK_PCLK5 =1; // clockSA????1Mhz
PWMPER4 = 125; //????8kHz=1Mhz/125, ??????
PWMDTY4 = 125; //duty circle=(PWMPER-PWMDTY)/PWMPER ,PPOL=0,left align
PWMPER5 = 125; //????8kHz=1Mhz/125, ??????
PWMDTY5 =60; //duty circle=(PWMPER-PWMDTY)/PWMPER ,PPOL=0,left align
PWME_PWME0 =1; //PWM??3??
PWME_PWME1 =1;
这是我用的你看着改该。关于值,你还是自己设置符合自己的。。我的你可能无法用
|
|