- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I thought there will be a PWM core/ip in Quartus Lite 15.1 (Qsys) but I think I'm wrong. Unless it has a weird name that I can't figure out. Is there one? ThanksLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps there isn't much call for PWM in the FPGA world? People that need pwm typically use micro-controllers. Even so, I'd be there are PWM impleemntations on opencores.org Try http://opencores.org/project,pwm it is marked done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An IP core for a PWM? What is this world coming to? Some functions are so simple that an IP core makes no sense. PWM definitely falls into that category IMO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
module pwmGenerator# (
parameter CTR_WIDTH = 10 //Width of PWM counter
)(
input clock,
input reset,
input tick, //Clock enable - to divide clock frequency as needed
input duty,
output reg pwmOut
);
localparam ZERO = 0;
localparam ONE = 1;
reg pwmCntr;
always @ (posedge clock or posedge reset) begin
if (reset) begin
pwmCntr <= ZERO;
end else if (tick) begin
pwmCntr <= pwmCntr + ONE;
end
end
always @ (posedge clock) begin
pwmOut <= (pwmCntr < duty);
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A Verilog implementation of the PWM was already provided on this forum, with the advantage to have the interface that allow you can build your own customized SOPC module to add it on Qsys such as you would do with a standard module, see that:
re: sopc pwm module (http://www.alteraforum.com/forum/showthread.php?t=6492&p=26669#post26669)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I have a Question about PWM Core.
I understand i can make the PWM working with the above code but how can i control it with the NIOS software and how can i merge it with other interfaces like i want to use all I2C, SPI and interrupts.
Please reply thank you..
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page