In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: I may be missing something but you seem to be going about this the hard way. I actually needed a similar 1-second timer for my time-lapse controller. The way I did it was to use a cascading timer in the ISR that would set a flag when one second had elapsed, then the timer would restart at 0. The foreground code monitored this flag and when it was detected, acted on it and then cleared it so that the ISR could set it again at the end of then next elapsed second. The attached program works the same, toggling an LED every 10 minutes. Looking at the compiled output I determined that no __PARAMx vars are used in the ISR so the NOPRESERVE option is fine. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=363831#m367229 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)