Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > SPWM using vhdl

Thread Tools

SPWM using vhdl

krithika211 krithika211 is offline
Junior Member
Join Date: Feb 2009
Posts: 4
can someone please give me the vhdl code to generate sinusoidal PWM signal?please help
Reply With Quote
JohnDuq JohnDuq is offline
Join Date: Dec 2008
Posts: 88
One way that I've used in the past is to generate a look up table of sine values, and then you need to cycle through it on your output. 256 values will give you better resolution than you will realize. Then step through the look up table with a 16-bit counter and you will be able to achieve many different frequencies (LUT is connected to the counter MSBs).

Reply With Quote
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348

An alternative to PWM could be PPM - the sinus values could come from a ROM and the feed into the PPM generator.
A simulation would look this:

More information can be found here:
Your welcome
Reply With Quote
krithika211 krithika211 is offline
Junior Member
Join Date: Feb 2009
Posts: 4
can u give me the test bench code for this program above??please.
also i need one more code.once the motor starts running at a speed we enter. this speed will be detected by a sensor.again i need the vhdl code to compare the signals n generate the error n to adjust the sine wave again in order to make the motor run at the correct speed.basically i need the vhdl code for the feedback system.please help.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
BPSK on VHDL (warning - VHDL newbie) pygmalion VHDL 6 06-23-2006 07:30 PM
VHDL 2002 vs VHDL 1993 dude VHDL 1 03-23-2006 01:18 PM
multiD-vhdl: Multi Dimensional Arrays (allowing generics on each dimension) for VHDL (including ports) VHDL 2 03-21-2006 04:05 PM
what's the difference between VHDL 93 CONCATENATION and VHDL 87 CONCATENATION? walala VHDL 3 09-18-2003 04:17 AM