dmulally@silver.sdsmt.edu wrote:
{Quote hidden}>
> Marc Schmaeche wrote:
> >
> > Hi folks,
> >
> > Enclosed you will see an extract of a complete PICMASTER's trace which
> > shows my problem. For some reason (which I don't know yet) my ISR
> > (interrupt service routine) is carried out twice. Below the trace there
> > are some explanations what's done in the ISR and the main routine.
>
> > As already mentioned my problem is that the ISR is executed twice. To
> > the best of my knowledge this shouldn't occur under any conditions!
> >
> > Please give me a note if I'm wrong or if I missed anything.
> >
> > Any hints will be appreciated highly.
> > Thanks in advance for your comments.
> >
> > Best regards,
> > Marc Schmaeche
> >
> Marc,
> I don't speak from personal experience and havn't looked at your code
> carefully but I've been told that this can happen due to a bug in the
> PIC. Something to do with the interupt flag being clocked into a
> flip-flop and taking 2 cycles to clear. A programming friend of mine
> insists that one should always check conditions to ensure that the
> interrupt is valid to avoid this. I'm not sure if all PICS do this.
>
> Dan
--
Dear Dan,
That's a good hint - but bad news for me too.
Of course I can check all the Interrupt Flag bits before the Interrupt
service routine (ISR) is responding to any of the Interrupt events. But
this would add a considerable amount of "wasted" time nor it would
prevent the PIC from starting the ISR twice (and wasting more time).
I wonder if anybody else have had already (bad) experience like this?
Moreover I'm becoming suspicious that the PIC16C622 sometimes might
"forget" enabled Interrupts (although I didn't yet achieve to get an
appropriate trace).
I would be very grateful if you or somebody else would send me more
information concerning the problems mentioned above (especially which
member of the PIC family was involved).
I look forward to hearing from you soon.
Thank you very much for your help.
Best regards,
Marc Schmaeche
-----------------------------------------------------------------------
ZENTRUM FUER ANGEWANDTE MIKROELEKTRONIK UND NEUE
TECHNOLOGIEN DER BAYERISCHEN FACHHOCHSCHULEN E.V.
Dipl.-Ing. M.Schmaeche Tel.: +49 (0)9131 691145
ZAM-Anwenderzentrum Nbg. Fax: +49 (0)9131 691166
Am Weichselgarten 7 E-Mail: spam_OUTmsTakeThisOuT
zam.nf.fh-nuernberg.de
91058 Erlangen, Germany (Ger/Eng/Spa welcome)
-----------------------------------------------------------------------