In SX Microcontrollers, SX/B Compiler and SX-Key Tool, John Kauffman wrote: Yes, those were dumb mistakes. Works like a charm now. I feel a lot more comfortable about using RTCC-timed ISR. Thanks. If I'm using the RTCC to generate relatively long times betwee pulses (like 1-100 seconds) is it correct in the ISR only set the prescalar high and do just a simple variable increment in the interupt and then do the scale-up looping in Main? In other words, would it be better to move that scaling into the interupt? I'm a little perplexed by the result. I'm getting a flash every 3.8 seconds when I expected every 4.2 seconds. I can't imagine anything happening in processing at an SX's speed that is using up .4 seconds. Anyhow, the RTCC should kick in regardless of what is happening in main, that is the idea of an interupt. Sources: ?? Internal timer is off by 11% My math is wrong? PAUSE 500 is having an effect on the RCTT? I'm also having problems finding in the literature when the RTCC is set to zero. Assuming prescaler of 1:1, does that always happen on the next cycle after count 255, regardless of the execution being in ISR or MAIN and regardless of what command is being executed (understanding, of course, that some commands take several cycles ot complete). Next step is to count the flashes and have the count show up on my four digit display. Then I want to get the timing solved and get an exact 0.010 second count going in the display Last, I want the display timer to start and end with closing of switches. Then I will have a timer for the elapse between switch-closing events lasting 0 to 99 seconds displayed to 0.01 seconds. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=120370#m120395 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)