In SX Microcontrollers, SX/B Compiler and SX-Key Tool, robotworkshop wrote: There does seem to be one thing to watch out for when trying to use the TIMER to do PWM that can drive you crazy. I had looked at the HELP file for the correct syntax. I went by the main structure of the command itself and tried something like: TIMER1 PWM Spd, Duty The help file should probably be updated to show the comma right after the PWM since none of the other commands like the prescaler seem to need it and one might expect that the PWM isn't supposed to have it either! If you leave that comma out it will happily compile your program without errors but you'll never get what you expect out of your program. I just read this post and noticed that there should be a comma after PWM like: TIMER1 PWM,Spd, Duty Adding the comma just fixed a problem that I was chasing down on and off all day. I missed the actual example and would have caught it sooner if the compiler had flagged it as an error. I kept overlooking the same thing. Now it works great! I hope this note saves someone else some time. Robert ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=192079#m193133 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)