简体   繁体   中英

Verilog can i use posedge and negedge to make 1 signal for ADC

im rather new to verilog, so i have a work to do, using basys 3 (replace a func gen to generate an analog signal) this will then display on an oscilloscope to digtal signal .

so currently, im using a posedge clock to produce a signal which is a straight line say 3.3V

so from my work , i need to convert this straight line 3.3v to a square wave.

1) since im using a posedge clock, which makes my output in oscilloscope a 3.3 straight line wave , im thinking of triggering the negedge clock to get the 0 signal which will the part for making the square wave from straight line.

2) im not sure if my thinking is correct or not, and whether can i combine both posedge and negedge clock signal into 1 signal.

3) if my above thinking is correct , is there anyone who can show me some eg on how i can do it ?

Is this what you're looking for? This is a simple code to generate square wave using a clock. I'm not sure how you're going to map the verilog code to a 3.3v supply circuit. Hope this helps.

reg out;
always @(posedge clk) begin
 out <= ~out;
end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM