In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jon Williams wrote: Well, there's the tried-and-true method of downloading the latest version of the software. You don't say what you version you have, but the simulator has not been part of the installation "for months." You can get it here: [url=http://www.parallax.com/sx/downloads.asp]http://www.parallax.com/sx/downloads.asp[/url] Still, you don't need the simulator running to see that you've got a tremendous number of errors. SX/B may be easy to use, but it has to be treated as seriously as assembly language. Sloppy programming habits tolerated by other versions of BASIC will bite you in SX/B. Obvious problems: - "count" is an SX/B keyword (so it can't be used as a variable name) - "hi" and "lo" are not keywords - "wait_ms" is not defined or coded - "wait_us" is not a keyword, and not defined and coded as a subroutine - You have math that would exceed eight bits I think you get my point. You didn't spell it out, but you seem to want to PWM the RB.0 port based on the value of the counter. I've attached a program that does what I think you want it to do. It compiles and runs in the simulator just fine (I'm in a hotel right now, so I have no hardware to actually run the program on). ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=91302#m91323 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)