Page 1 of 1

PIC16F18326 Interrupt error

Posted: Fri Apr 24, 2026 4:35 pm
by DirkB
Hello,

I've noticed that on the PIC 16F18326, interrupts always trigger on both edges when a falling edge is set. This applies to the IOC and INT pins.

Regards

Re: PIC16F18326 Interrupt error

Posted: Fri Apr 24, 2026 8:51 pm
by mnfisher
Can you post a simple demo showing this?

Looking at the datasheet - bits are set in IOCxP and IOCxN for rising and falling edge interrupts - both to detect both.

I added an IOC interrupt to a chart and selected some pins (the 'selection' image is too small - and I couldn't find keys to enlarge it) - then looking at the code generated:

Code: Select all

  // Interrupt
  st_bit(INTCON,GIE);
  IOCAP=0x28;
  IOCAN=0x18;
  IOCCP=0x0;
  IOCCN=0x0;
  st_bit(PIE0, IOCIE);
Which looks okay?

Martin