Can I use interrupt mode that is not pin-dependent?

General discussion on mikroC.
Post Reply
Author
Message
vaia-riseng
Posts: 10
Joined: 24 Oct 2011 08:36

Can I use interrupt mode that is not pin-dependent?

#1 Post by vaia-riseng » 31 Oct 2011 07:39

For example, I have a PWM signal coming in at RE0_bit in a DSPIC30f4011. This pin does not have a hardware interrupt ability. But I want my PIC to raise an interrupt whenever there is a change of state in that pin. Is this possible? I'm sorry, I do not have a working code yet since I have no idea where to begin doing this. Thanks very much! :)

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Can I use interrupt mode that is not pin-dependent?

#2 Post by janko.kaljevic » 31 Oct 2011 13:46

Hello,

You will have to use pin with External Interrupt for this purpose.
If you really need to use E0 pin, you can connect PWM signal on INT0 pin too, and use it to trigger interrupts.

Best regards.

vaia-riseng
Posts: 10
Joined: 24 Oct 2011 08:36

Re: Can I use interrupt mode that is not pin-dependent?

#3 Post by vaia-riseng » 31 Oct 2011 14:28

Hi! Thank you very much for answering my question! So it really is not possible to make an internal interrupt in DSPIC? Also, I have found out that Change Input State capability of DSPIC can do this, but I would just like to ask if there is only one interrupt line served by this capability for all the CN pins? Thanks very much!

Post Reply

Return to “mikroC General”