In SX Microcontrollers, SX/B Compiler and SX-Key Tool, robotworkshop wrote: Hello Bean, I'm going to try just the square wave output first to see if that will work. I don't need to hit every frequency within that range. Just a few specific ones that I'd need to get close to. At the moment it looks like some would be around 1600Hz, 2000Hz, 2600Hz, 2800Hz, etc. I've got some experimenting to do and will probably need to break out the scope to determine some of the others. My first thought was to do it in the ISR. With a single one it would just have a counter equal to half my target frequency. When ever the counter gets down to zero, toggle the output, and reload the counted. Ideally i'd like to have it based on an ISR rate that the background buffered Serial code can work with in case I want to use the serial port later. I'm just not quite sure what i'd do with more than one going. It should be interesting to figure out. Robert ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=264947#m264977 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)