On Thu, 27 Jul 1995 14:43:19 GMT+0200, Daniel Aylen wrote: > Is there anyone programing the 16c71 useing thr RTCC interupt. > I am having a problem executing the interupt plaese could you > contact me I need all the help I can get . I don't know why you are asking the PIC list for help on this *again*. I sent you (and CC'd the list) previously with a general list of suggestions. You sent me a copy of your program, and I emailed you more specific suggestions on July 24th. Perhaps you didn't receive my suggestions, so I am attaching a copy of them below. I am also CC'ing this to the list in case you aren't getting the email I send you directly. Cheers, Eric ---- Previously sent email begins ---- Date: Mon, 24 Jul 1995 02:26:45 -0700 From: eric@apache.Telebit.COM (Eric Smith) To: DNA@msi.imt.za In-Reply-To: <1DF105548BC@msi.imt.za> (message from Daniel Aylen on Mon, 24 Jul 1995 10:21:50 GMT+0200) Subject: Re: Daniel's '71 I've only had time to take a cursory look at your program, but I do have a few suggestions. I notice that you are setting the RTCC to 254. Are you aware that it counts *up*, so you are getting the interrupt after two counts, which with a prescaler of 32 will be 64 instruction cycles? Writing to the RTCC clears the prescaler, so you should be aware that you can't get precise intervals by this method, as your interval will be two timer counts plus the interrupt latency plus the instructions cycles up to the write to RTCC. Since your main line code is an empty infinite loop, it is OK that you don't save and restore W and STATUS, but you couldn't get away with that otherwise. It is generally preferred to not explicitly set the GIE bit in the interrupt routine, but rather to end it with an RETFIE which will turn it back on. This avoids any potential problem with unexpected nested interrupts. Until you get the RTCC interrupt debugged, you probably shouldn't turn on the INTE and RBIE bits in INTCON. If you still have trouble, let me know. Cheers, Eric ---- Previously sent email ends ----