Problem with external interrupt on new PIC using PPS.

20 views
Skip to first unread message

rob...@hotmail.com

unread,
Mar 9, 2023, 4:07:11 PM3/9/23
to jallist
Hi all,

I am working on a project using a relatively new PIC and using an external interrupt.

The external interrupt is driven by a 1 second signal coming from a DS3231 real time clock.

The problem occurs when I re-assign the INT input to another input pin. The interrupt works when using the default pin (b0) but it does not work when assigning it to another pin. According to the datasheet you could reassign the pin to a pin of port a.  In fact the reassign function does nothing. When I reassign the interrupt to pin a5 it still keeps on working on the default pin b0.

Since this is a very new chip there is no errata list yet and I am not sure if it is a bug in the chip. Or I am overlooking something but I do not see it. I did not yet check the PPS library to see if there might be an issue with newer PICs.

I attached the test program. I commented out the use of pin a5 but if I comment out pin b0 and use a5 as input it does not work.

Any suggestions?

Thanks.

Kind regards,

Rob

16f18076_interrupt_test.jal

Rob Hamerling

unread,
Mar 10, 2023, 6:39:31 AM3/10/23
to jal...@googlegroups.com

Hello Rob,


On 09-03-2023 22:07, rob...@hotmail.com wrote:
I am working on a project using a relatively new PIC and using an external interrupt.

The external interrupt is driven by a 1 second signal coming from a DS3231 real time clock.

The problem occurs when I re-assign the INT input to another input pin. The interrupt works when using the default pin (b0) but it does not work when assigning it to another pin. According to the datasheet you could reassign the pin to a pin of port a.  In fact the reassign function does nothing. When I reassign the interrupt to pin a5 it still keeps on working on the default pin b0.

Since this is a very new chip there is no errata list yet and I am not sure if it is a bug in the chip. Or I am overlooking something but I do not see it. I did not yet check the PPS library to see if there might be an issue with newer PICs.

I don't know if your issue is specific for that chip, and I don't have this type. So I'm afraid I have only some suggestions:
- try another PIC (of a related family)
- use interrupt-on-change in stead of INT (no PPS needed!)

Regards, Rob.

--
Rob Hamerling, Vianen, NL

Rob CJ

unread,
Mar 10, 2023, 11:46:32 AM3/10/23
to jal...@googlegroups.com
Hi Rob,

Thanks for the hint. I was indeed looking for a another PIC that I have laying around but need to look a bit better.  One disadvantage of using this PIC is that it is not supproted by the PICkitPlus software nor by MPLABX using a Pickit3 so you have to use a Pickit4 (which I do not have) or a SNAP programmer (which I do have). I noticed that MPLABX is not always very stable using the SNAP programmer (programming failed errors). So you may wonder why I am using this PIC at all ....

I did not think of interrupt on change. That might be a solution.

I was also planning to post the issue on the  Microchip forum but it is currently in read-only mode because they are changing things. Once that is over I will also post my problem there.

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens Rob Hamerling <robham...@gmail.com>
Verzonden: vrijdag 10 maart 2023 12:39
Aan: jal...@googlegroups.com <jal...@googlegroups.com>
Onderwerp: Re: [jallist] Problem with external interrupt on new PIC using PPS.
 
--
You received this message because you are subscribed to the Google Groups "jallist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallist+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jallist/5513e5bc-7b7b-34bf-d1af-6c25882f3dba%40gmail.com.

Rob CJ

unread,
Mar 10, 2023, 1:35:41 PM3/10/23
to jal...@googlegroups.com
Hi Rob,

Switched from external interrupt to IOC on pin_a5 and that works!

Thanks again for the hint.

Kind regards,

Rob

Van: jal...@googlegroups.com <jal...@googlegroups.com> namens Rob CJ <rob...@hotmail.com>
Verzonden: vrijdag 10 maart 2023 17:46
Reply all
Reply to author
Forward
0 new messages