Since you are using an 18F4550, it means you are using MPASM as the assembler.
So, DEFINE i2c_hold 1 needs to be Uppercase.
Not sure what you mean here. The INTCAP? registers are read-only.You can read back every register except one (INTCAP). I do not know what fails, read or write
Also not sure what you are trying to do with the port.
You write all 1's to the output latch OLAT1, then set all but 1 pin to input IODIR1, then write to GP1 which actually writes to OLAT1 again. Doesn't make sense.
What is it you're trying to do, and what's not working.
Bookmarks