三番修改终于把电路修改的差不了,可是最后输出的波形却不理想。竟然发生断裂,这是为什么呢??请给位大侠帮帮忙啊。。
这里把图贴上
输出正弦波变形了。。
检查了,两路输出的是一个正弦表,如下
0.010 ,0.025 ,0.040 ,0.055 ,0.070 ,0.085 ,0.100 ,0.115 ,0.130 ,0.145 ,
0.160 ,0.175 ,0.190 ,0.205 ,0.220 ,0.235 ,0.250 ,0.260 ,0.275 ,0.285 ,
0.300 ,0.315 ,0.325 ,0.335 ,0.350 ,0.360 ,0.370 ,0.380 ,0.390 ,0.400 ,
0.410 ,0.420 ,0.425 ,0.435 ,0.440 ,0.450 ,0.455 ,0.460 ,0.470 ,0.475 ,
0.480 ,0.480 ,0.485 ,0.490 ,0.495 ,0.495 ,0.495 ,0.500 ,0.500 ,0.500 ,
0.500 ,0.500 ,0.500 ,0.495 ,0.495 ,0.495 ,0.490 ,0.485 ,0.480 ,0.480 ,
0.475 ,0.470 ,0.460 ,0.455 ,0.450 ,0.440 ,0.435 ,0.425 ,0.420 ,0.410 ,
0.400 ,0.390 ,0.380 ,0.370 ,0.360 ,0.350 ,0.335 ,0.325 ,0.315 ,0.300 ,
0.285 ,0.275 ,0.260 ,0.250 ,0.235 ,0.220 ,0.205 ,0.190 ,0.175 ,0.160 ,
0.145 ,0.130 ,0.115 ,0.100 ,0.085 ,0.070 ,0.055 ,0.040 ,0.025 ,0.010
共100个(在程序中充当占空比的角色),不过我是在两个桥臂交替的时候程序如下
if(spwm_change)
{
TMR32B1MR0 = TMR32B1MR3*a[i_timer32b1];//打开第一路SPWM
TMR32B1MR1 = 0; //第二路SPWM的占空比值0(关掉第二路SPWM)
}
else
{
TMR32B1MR0 = 0;//第一路的SPWM关
TMR32B1MR1 = TMR32B1MR3*a[i_timer32b1]; //打开第二路SPWM
}