P_coparator: process(clk)
begin
if rising_edge(clk) then
if phase_wide_buf>=ref_cnt then
pulse<='1';
else
pulse<='0';
end if;
end if;
end process;
P_deadtime: process(clk)
begin
if rising_edge(clk) then
if pulse='1' and (dead_cnt/=dead_reg) then
dead_cnt<=dead_cnt+1;
elsif pulse='0' and (dead_cnt/="00000000") then
dead_cnt<=dead_cnt-1;
end if;
if pulse='1' and (dead_cnt=dead_reg) then
phase_h<='1';
else
phase_h<='0';
end if;
if pulse='0' and (dead_cnt="00000000") then
phase_l<='1';
else
phase_l<='0';
end if;
end if;
end process;
输出在P60(ah), P61(al);P62(bh),P63(bl)等,我现在是只是测试,所以A,B,C三相一样的,有按键给脉宽值,结果在示波器上看到,al,bl管脚输出峰值与配置的3.3V一致;ah,bh输出只有700mv,与配置的差距很大,不是3.3V。P60与P61是差分引脚,但我还是按普通引脚用的,会有影响吗?形状与预期的基本一致,就是电压不一样,新手,求大虾解决!!
我换了P63(ah),P61(al),还是一样,ah峰值700mv,al峰值3.3v,波形形状符合要求。不是示波器问题,我检查过了!!! |