square wave with duty cycle

Applications, development tools, FPGA, C, WEB
Post Reply
aschuetz
Posts: 34
Joined: Tue Nov 24, 2015 11:26 am

square wave with duty cycle

Post by aschuetz » Fri Feb 17, 2017 12:06 pm

Hi all,

I tested the signal generator (http://wiki.redpitaya.com/index.php?tit ... _utilities).

The command

Code: Select all

./generate 1 2 1000000 sqr
creates a square wave. What I need is a duty cycle. Is it possible to use the generator for this?

Thanks,
Alex

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: square wave with duty cycle

Post by Nils Roos » Fri Feb 17, 2017 1:37 pm

Hi,

the generate utility only supports square, sine, and triangular waveforms. With some basic C knowledge you could make it support others, it is just a matter of calculating different sample values to be written into the generator's waveform buffer.

aschuetz
Posts: 34
Joined: Tue Nov 24, 2015 11:26 am

Re: square wave with duty cycle

Post by aschuetz » Wed Mar 08, 2017 2:57 pm

Hi all,
I modified the original generator to use it for PWM. You can find a quick & dirty solution here: https://github.com/schlenzmeister/RedPitayaGenerator
Maybe it will help someone else.

PS: The overshot is not fixed yet.

Alex

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 20 guests