This checkbox enables special I/O port associated side effects to be trapped. Sometimes these side effects have no real effect on the program since they are safely masked by later I/O accesses, or the side effect is intensional. In either case in these instances the side effect is ignored by disabling this trap condition.A port modify side effect can occure when using a read modify write instruction (such as BCF or INC) on a port which is driving outputs that can themselves be driven by some external source.
e.g.
- PORTA is driving 0xFF
- externally bit 3 of the PORTA I/O lines is driven to 0 so that PORTA outputs actually look like 0xF7
- executing BCF PORTA,0 should set PORTA outputs to 0xFE but because its I/O lines are actually 0xF7 its I/O lines actually get set to 0xF6, i.e. PORTA bit 3 and bit 0 have been set to 0
- when the external driver tries to drive bit 3 to 1, PORTA bit 3 will still be at 0