In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: You'll need to remember that there are practical limits when using interrupts; you can only do so much in a given amount of time and a program that works with a 20 MHz resonator may well crash at 4 MHz -- you just can't put 10 pounds of gold in a sack designed for 2 pounds, no matter how bady you may want to. The rate parameter of INTERRUPT makes things really easy to get started because the value for OPTION is handled automatiaclly and is based on your FREQ setting -- all you have to do is know that rate, and it's based on what your hardware needs to do, not what the SX's oscillator is doing (if there's a conflict, the compiler will tell you). When you're mixing VPs, as I did above, it takes a little more thought, but it's really not very difficult so long as one rate can be evenly divided into the other; just put the VP that runs more frequently first, then the divider code, then the slower VP. Try with something simple first, like flashing three LEDs at different rates (see attached) using the ISR and ISR divisor tricks like I used. Once you understand the concept, the rest will fall into place. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=175077#m175744 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)