采用CPLD与DAC0800作了一个转化数模转换电路,输出的波形的相位在不停的跳动,请教一下怎样消除相位的跳动阿;源码如下: module charge1(clk,seg7,GND1,GND2); input clk; output [7:0]seg7;//plus output reg[2:0] counter1; reg GND1; reg GND2; reg[7:0] seg7;
always @(posedge clk) begin counter1=counter1+1;
GND1 = 0; GND2 = 0; case(counter1) 3'h0:seg7 = 8'hC1; 3'h2:seg7 = 8'hD9; 3'h4:seg7 = 8'hE0; 3'h6:seg7 = 8'hE6; default: seg7 = 8'hff; endcase end endmodule 波形为一高一低间隔,高电平的大小有D/A数据提供。 [em06] |