RE: Period Wave Modulation

"zl" <[email protected]> Wed, 2 Feb 2005 10:15:45 -0500
Newsgroups gmane.linux.real-time.rtlinux.general
Message-ID <20050202151543.JQZG28171.out011.verizon.net@Saturn>
I assume you want square wave.  In order to get various duty cycle, I think
you have to run your periodic task at a much higher frequency.  For example
run it at 100k, and you can get 10% duty cycle by set output low for 9
cycles, and set output high for one cycle.  If you want high resolution,
then you need to run the period task at even higher rate.  Another way is
use timer to wake up your thread.  You can vary the delay of the timer to
achieve varies duty cycle.


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Jesse Vogt
Sent: Monday, January 31, 2005 11:00 PM
To: [email protected]
Subject: [Rtl] Period Wave Modulation

Hello,

I am using RTLinux and a CIO-DIO48H digital I/O board to control
several servo motors. I need to create a 10 kHz  wave with a variable
duty cycle.  I am able to generate a solid 10 kHz wave using periodic
thread but that only allows a 50% duty cycle.  Any ideas?

Thanks,

Jesse
_______________________________________________
Rtl mailing list
[email protected]
http://www2.fsmlabs.com/mailman/listinfo/rtl

_______________________________________________
Rtl mailing list
[email protected]
http://www2.fsmlabs.com/mailman/listinfo/rtl