In SX Microcontrollers, SX/B Compiler and SX-Key Tool, natpie wrote: Here is a little test program I wrote a while ago to control a RGB led by a variable duty cycle. It should give you an idea of how to do multiply PWM from an interrupt. Its pretty easy. You have a counter for your your entire duty cycle. You compare this counter to variables of the time for your individual PWMs. if it is equal shut that output off. When your duty cycle counter rests turn all of your PWMs back on and start over. Then in your main program you just edit the variables to change the PWMs and you never have to think about it. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=372373#m372401 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)