cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
8,557 Views
Registered: ‎01-13-2012

generate pwm signal

hello

iam needed to generate pwm signal in edk program using timer on spartan 3e. what steps to do that?.

thank you................................

0 Kudos
7 Replies
Highlighted
Scholar
Scholar
8,553 Views
Registered: ‎02-27-2008

ss,

 

Step 1:  go research (read) about programming a PWM control in verilog, or VHDL (your choice).


Step 2:  read about performing PWM in c code.

 

Step 3:  decide if the c version is fast enough, if so, write your pwm controller in c, and use gpio for the signals.

 

Step 4:  if the c code is too slow, or can not provide the resolution, then create the design in RTL (verilog or VHDL).  Add the RTL code block as a peripheral in EDK, and either drive it through a memory mapped interface, gpio, or a FSL off the AXI bus.  You may also implement the PWM controller entirely in logic, and not use EDK at all, if you do not need the processor system.

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
Highlighted
8,289 Views
Registered: ‎03-27-2013

Hi i want to generate Sinusoidal Pulse Width Modulation scheme using Xilinx System Generator. Is it Possible to generate through System generator With Sinusoidal signal of 50 Hz frequency and Triangular Signal of 3kHz frequency . 

 

 

 

0 Kudos
Highlighted
Contributor
Contributor
8,283 Views
Registered: ‎01-13-2012

hello

 

Iam want to use timer core to generate pwm signal as found in data sheet of xps timer and using functions found in timer to generate signal.

 

thank you for reply..........................

0 Kudos
Highlighted
Teacher
Teacher
8,276 Views
Registered: ‎11-14-2011

ss_tech:

 

1. Read the XPS Timer datasheet.

2. Add the Timer IP to your XPS project.

3. Write some C code for the MicroBlaze to manipulate the Timer IP registers in accordance to their description and your requirements.

 

Regards,

 

Howard

 

----------
"That which we must learn to do, we learn by doing." - Aristotle
0 Kudos
Highlighted
Contributor
Contributor
8,269 Views
Registered: ‎01-13-2012

hello

iam  adding xps timer and using functions found in timer and using configuration the timer as the data sheet and get the result on the scope as below but the result is correct or not ?.please

 

thank you for reply..........

.

 

0 Kudos
Highlighted
Teacher
Teacher
8,266 Views
Registered: ‎11-14-2011

I don't know what your requirements are, so I can't comment on whether it is "right". It looks like you have generated a PWM signal but I can't really see what the timebase or signal measurements on your scope shot are.

 

----------
"That which we must learn to do, we learn by doing." - Aristotle
0 Kudos
Highlighted
Contributor
Contributor
8,262 Views
Registered: ‎01-13-2012

PWM_PERIOD = (TLR0 + 2) x PLB_CLOCK_PERIOD

PWM_HIGH_TIME = (TLR1 + 2) x PLB_CLOCK_PERIOD

when using this do not appear on the scope

 

as the work correct or not? please

 

ss

0 Kudos