Searching \ for '[PIC]How to correctly handle dsPIC interrupts in a' 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/ints.htm?key=interrupt
Search entire site for: 'How to correctly handle dsPIC interrupts in a'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]How to correctly handle dsPIC interrupts in a'
2008\04\03@015617 by Stephen D. Barnes

flavicon
face
I am working with the dsPIC30F2010. This chip is new to me. I have read
the data sheet..family ref, etc.
I have configured RE8 as an external interrupt (INT0) on rising edge.
When the interrupt occurs the the correct
interrupt flag is set and the chip then goes to what appears to be the
start of the program. I am using
the assembly template that Microchip supplies with MPLab. How exactly
does one create an ISR for the
dsPIC? In the 16F series it was an ORG <address> and that's where the
ISR went. The dsPIC interrupt vector
table says the address is 0x000014. I'm lost. Any pointers in the right
direction would be appreciated.
--

*Regards,*

*Stephen D. Barnes*

2008\04\03@083347 by Djula Djarmati

flavicon
face
Stephen D. Barnes wrote:
> I am working with the dsPIC30F2010. This chip is new to me. I have read
> the data sheet..family ref, etc.
> I have configured RE8 as an external interrupt (INT0) on rising edge.
> When the interrupt occurs the the correct
> interrupt flag is set and the chip then goes to what appears to be the
> start of the program. I am using
> the assembly template that Microchip supplies with MPLab. How exactly
> does one create an ISR for the
> dsPIC? In the 16F series it was an ORG <address> and that's where the
> ISR went. The dsPIC interrupt vector
> table says the address is 0x000014. I'm lost. Any pointers in the right
> direction would be appreciated.

You don't need to mess with interrupt vector table manually, you just
use the predefined interrupt labels from linker script (i.e. p30f2010.gld).
I'm sure an example can be found in Microchip templates somewhere.


Example for TMR1 interrupt:

__T1Interrupt:  PUSH.S                  ;TMR1 INT each 1ms, save context
                BCLR    IFS0, #T1IF     ;Clear TMR1 interrupt flag

               NOP                     ;Do something useful

EndIntTMR1:     POP.S                   ;Restore context
                RETFIE                        ;Done


Djula

2008\04\03@135346 by Stephen D. Barnes

flavicon
face
Aha! That points me in the right direction.
Thank you very much.

Djula Djarmati wrote:
{Quote hidden}

--

*Regards,*

*Stephen D. Barnes*

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