PIC24F: Change Notification pins

Thread Starter

Robin66

Joined Jan 5, 2016
275
Hi PICers. I have Change on Notification working for CN1 but can't get it to work for CN29 or CN32. The datasheet contains contradictory info but it may explain why CN29/32 aren't working for me. Does anyone know which of these statements is correct?

pg 13: Table showing 37 pins available for ICN interrupts on quad devices
upload_2017-11-2_11-4-49.png

pg 138:
Depending on the device pin count, there are up to 23 external signals (CN0 through CN22) that may be selected (enabled) for generating an interrupt request on a Change-of-State.

http://ww1.microchip.com/downloads/en/DeviceDoc/30009995e.pdf
 

geekoftheweek

Joined Oct 6, 2013
1,216
It's possible that statement is a typo or misleading... perhaps only 0 - 22 will wake it from sleep. It may also be only 0 - 22 will cause the interrupt code itself will be executed and the rest have to be polled. Are you using interrupts or polling? I have worked a bit with the the 304 version as well, but didn't try the interrupt on change feature yet. The datasheet shows CN29 and 32 so they should work. How are your clock configuration bits set? If you have a the clock out signal enabled then that would cause 29 to not work. As far as 32 goes there's no reason it shouldn't work. Just a couple basic thoughts and questions.
 

Thread Starter

Robin66

Joined Jan 5, 2016
275
It's possible that statement is a typo or misleading... perhaps only 0 - 22 will wake it from sleep. It may also be only 0 - 22 will cause the interrupt code itself will be executed and the rest have to be polled. Are you using interrupts or polling? I have worked a bit with the the 304 version as well, but didn't try the interrupt on change feature yet. The datasheet shows CN29 and 32 so they should work. How are your clock configuration bits set? If you have a the clock out signal enabled then that would cause 29 to not work. As far as 32 goes there's no reason it shouldn't work. Just a couple basic thoughts and questions.
Thanks for the reply @geekoftheweek. I'm using interrupts. It works perfectly for CN1 but I get nothing at all for CN29/32. I don't have clock out enabled, and in fact I use the CN29/32 pins for analog input at other stages in the code. I do the same for CN1.
 

geekoftheweek

Joined Oct 6, 2013
1,216
Thanks for the reply @geekoftheweek. I'm using interrupts. It works perfectly for CN1 but I get nothing at all for CN29/32. I don't have clock out enabled, and in fact I use the CN29/32 pins for analog input at other stages in the code. I do the same for CN1.
You're welcome. I'm at a loss as to what to try next. What always works for me is cuss at it, threaten it, scream and yell, and then stare at things until I'm cross eyed, and then take a break for a week or two... next thing you know that answer jumps right out and about knocks me out of the chair. Good luck!!
 
Top