PIC24 - testing I2C module dead/alive
If you are using XC16, you can #include &lt;i2c.h&gt; and try using the OpenI2C1() library call to do the dirty work of configuring the peripheral instead of writing directly to the SFR.

Here is code I use to open I2C1 as a master:

#include &lt;i2c.h&gt;

u16Clk = 39; // specified by OP

OpenI2C1(
    I2C1_ON &amp;
    I2C1_IDLE_CON &amp;
    I2C1_7BIT_ADD &amp;
    I2C1_STR_EN &amp;
    I2C1_SLW_DIS &amp;
    I2C1_GCALL_DIS &amp;
    I2C1_SM_EN &amp;
    I2C1_IPMI_DIS,
    u16Clk
);


Once it's open, you can see if it works by sending a start, sending an arbitrary (non-reserved address), then send a stop (while scoping the lines).

StartI2C1();
MasterWriteI2C1(data);
MasterWaitForIntrI2C1();
StopI2C1();