Searching \ for '[PIC]: how does this exit the ISR?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'how does this exit the ISR?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: how does this exit the ISR?'
2002\03\21@112652 by Micro Eng

picon face
Here is a snippit of code, right out of AN734

ISR
<deleted the save stuff for the ISR entry>

       banksel PIR1
       btfss   PIR1,SSPIF      ; Is this a SSP interrupt?
       goto    $               ; No, just trap here.
       bcf     PIR1,SSPIF
       call    SSP_Handler     ; Yes, service SSP interrupt.

<deleted the recall for saved stuff>

       retfie                  ; Return from interrupt.

From this...it checks the PIR1 bit to see if the I2C is the source of
interupt and if so, clears it and handles it.  Otherwise the 'goto $' makes
it just sit and stay there, so how does it exit the ISR if the interupt is
not from the I2C, or given that there cannot be another source, does it
simply lock up then? Not exactly sure what is going on there.

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2002\03\21@121417 by Micro Eng

picon face
as I started to think....perhaps its the WDT that forces it out?

{Quote hidden}

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2002\03\21@122347 by Alan B. Pearce

face picon face
>as I started to think....perhaps its the WDT that forces it out?
.....
>Here is a snippit of code, right out of AN734
>
>ISR
><deleted the save stuff for the ISR entry>
>
>        banksel PIR1
>        btfss   PIR1,SSPIF      ; Is this a SSP interrupt?
>        goto    $               ; No, just trap here.
>        bcf     PIR1,SSPIF
>        call    SSP_Handler     ; Yes, service SSP interrupt.

The as published code would have a jump to somewhere else specified instead
of the $ to handle some other interrupt, e.g. timer or uart, would be my
expectation. I cannot see how they expect any use to be made of the transfer
otherwise.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


2002\03\21@123809 by Olin Lathrop

face picon face
> Here is a snippit of code, right out of AN734
>
> ISR
> <deleted the save stuff for the ISR entry>
>
>         banksel PIR1
>         btfss   PIR1,SSPIF      ; Is this a SSP interrupt?
>         goto    $               ; No, just trap here.
>         bcf     PIR1,SSPIF
>         call    SSP_Handler     ; Yes, service SSP interrupt.
>
> <deleted the recall for saved stuff>
>
>         retfie                  ; Return from interrupt.
>
> From this...it checks the PIR1 bit to see if the I2C is the source of
> interupt and if so, clears it and handles it.  Otherwise the 'goto $'
makes
> it just sit and stay there, so how does it exit the ISR if the interupt is
> not from the I2C,

It doesn't.

> or given that there cannot be another source, does it
> simply lock up then?

Yes.

> Not exactly sure what is going on there.

You found a very poorly written example.  In general I find the Microchip
example code pretty poor.  Reading the manual to understand how to do it
yourself is much better than copying their stuff.  I don't look at Microchip
example code anymore.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, KILLspamolinKILLspamspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2002\03\21@124211 by Bob Blick
face picon face
>         banksel PIR1
>         btfss   PIR1,SSPIF      ; Is this a SSP interrupt?
>         goto    $               ; No, just trap here.
>         bcf     PIR1,SSPIF
>         call    SSP_Handler     ; Yes, service SSP interrupt.
>
> >From this...it checks the PIR1 bit to see if the I2C is the source of
> interupt and if so, clears it and handles it.  Otherwise the 'goto $' makes
> it just sit and stay there, so how does it exit the ISR if the interupt is
> not from the I2C, or given that there cannot be another source, does it
> simply lock up then? Not exactly sure what is going on there.

Yes, it just locks up if not an I2C interrupt. This is an example, and
they didn't have any other sources of interrupt, but put the stub there
for you to use if you have other sources of interrupt, just change the
jump.

Cheerful regards,

Bob

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...