In SX Microcontrollers, SX/B Compiler and SX-Key Tool, SteveW wrote: Hang on a minute, I don't see how this can ever work. PWM PWM's the pin while that command is running, yes? It's not a background thing, and, if there's no circuitry holding the PWM'd value (tricky for a LED, without buffering), then each LED will only come on (at the selected brightness) while its PWM command is running. When the other LEDs are being PWM'd, it'll be off. Wouldn't ditching PWM be the right solution, and, in the inner loop, roll your own 3-channel PWM. Count from 0 to 255, and, if the counter's less than each LED value, turn that LED on, else turn it off. All LEDs will be off outside the central loop, so don't spend much time out there... That, or do this properly, under timer interrupts, and it'll all work seamlessly. Steve ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=118695#m119027 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)