In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: You'll need to determine the lowest common denomiator -- timing-wise -- run your ISR at that and then divide it up for your various VPs. Here's a butt-simple example: [code]' ========================================================================= INTERRUPT 1_000 ' ========================================================================= INC led1Timer IF led1Timer = 100 THEN TOGGLE Led1 led1Timer = 0 ENDIF INC led2Timer IF led2Timer = 133 THEN TOGGLE Led2 led2Timer = 0 ENDIF IF led3Timer = 221 THEN TOGGLE Led3 led3Timer = 0 ENDIF RETURNINT[/code] The ISR runs every millisecond; LED #1 gets toggled every 100 ms, LED #2 gets toggled every 133 ms, and LED #3 gets toggled every 221 ms. The example is not really practical, but demonstrates that for each of your VPs you may need to keep track of separate dividers. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=192079#m196096 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)