Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHi Dave, thanks for clearing up.
here is the link for the PSD: "en.wikipedia.org/wiki/Position_sensitive_device" the modulation is performed in the analog domain by somebody else. I dont have a clear mind of what the process is, I can ask him if this is really important to my design. Here is a piece of code I found on line which can transfer a clock into a sine/cosine wave ("edaboard.com/thread39599.html"): module sine_cos(clk, reset, en, sine, cos); input clk, reset, en; output [7:0] sine,cos; reg [7:0] sine_r, cos_r; assign sine = sine_r + {cos_r[7], cos_r[7], cos_r[7], cos_r[7:3]}; assign cos = cos_r - {sine[7], sine[7], sine[7], sine[7:3]}; always@(posedge clk or negedge reset) begin if (!reset) begin sine_r <= 0; cos_r <= 120; end else begin if (en) begin sine_r <= sine; cos_r <= cos; end end end endmodule // sine_cos so, if the code works, instead of using NCO, I can transform a square wave into a sine wave right? as long as I get a 154Khz clock. Allison