In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: Okay, I have NO IDEA if this will work, but try it and see (when you get the programmer). You send a "P", On_LSB, On_MSB, Off_LSB, Off_MSB (so five bytes in total). The board runs at 4mhz, so the On and Off times are at 4MHz. To run though the PWM output levels you could do something like: FOR I =0 TO 255 SEROUT "P", I, 0, (255-I), 0 ' "0" is a zero PAUSE 100 NEXT Something like that will will generate a 15.6KHz PWM output that varies in duty cycle. Let me know if the code works. Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=258700#m258896 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)