In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Dunnsept wrote: Currently my ISR is the generic one from the help files for a clock/timer. The only modification so far is what Bean wrote to change tix from 200 to 125 and returnint from 156 to 250. I want to add code to my ISR a la the examples for updating my display (going to add one of Bean's HC4LEDs to the system). What method should I use, if any, to re-calc my RTCC return value and tix counter? Do I even need to worry about it? I don't need [i]great[/i] accuracy, but still would like to know. I read in Guenther's book all of the stuff about counting the clocks for the ISR, is this also the method for SX/B? Go and look at the generated code and find out what my cycle count is for the ISR? Is it that as long as I'm under some value (something in the book about nc-7, dont have it with me, and can't remember) I am good to go? [code] ISR_Start: INC tix ' update tix counter IF tix = 125 THEN ' check for 1 second tix = 0 INC secs if use_extra = 1 then inc extra_secs endif IF secs = 60 THEN ' check for new minute secs = 0 INC mins if extra_secs = 60 then inc time1 extra_secs = 0 endif IF mins = 60 THEN ' check for new hour mins = 0 INC hrs IF hrs = MaxHr THEN hrs = 0 ENDIF ENDIF ENDIF ENDIF ISR_Exit: RETURNINT 250 [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=121632 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)