How to get variable frequency sinewave that can be converted to verilog using HDLCODER
2 views (last 30 days)
Show older comments
Roy Francis
on 12 Apr 2014
Commented: Tim McBrayer
on 15 Apr 2014
Hello,
I would like to build a variable frequency sinewave that can be converted to verilog using HDLCODER. Frequency variations needed in steps of 1,5,10,15,20,25,30,35,40,45 & 50Hz (10 to 11) steps. Waiting for the response.
Thanking you in advance.
Regards,
Roy
0 Comments
Accepted Answer
Tim McBrayer
on 14 Apr 2014
How would you build a single-frequency sine wave generator? How would two single-frequency sine wave generators operating at different frequencies look alike? How would they be different? Once you have a solid grasp of the answers to these questions the solution should present itself.
2 Comments
Tim McBrayer
on 15 Apr 2014
These are all sine waves; they have the identical shape. The only difference is what the step size is between your samples. If you have 100 table entries for a table containing one full cycle, then for a 10Hz wave (with a period of 0.1 sec), the time step between samples is 0.001 sec. If you take the same table, and now interpret it as a 20Hz sine wave (period == 0.05 sec), the time step between table samples is 0.0005 sec. The only thing that changes is your time scale; the table data is the same for all sine waves.
Also, keep in mind that all 4 quadrants of the sine wave are identical; with a minimal amount of work you only need to create a 1/4 wave table.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!