I am trying to get I2C working for the first time. I am using XC8 and the peripheral library.
My chip is the pic18f26k22. I have pines 14 - I2C clock and pin 15 - I2C data tied high via a 10K pullup.
I tried the following code
but get no output on either pin. All I see is the +5V from the pullup. No transitions .
Is there something else that I am missing?
Do I need an active slave to see output from the master???
My chip is the pic18f26k22. I have pines 14 - I2C clock and pin 15 - I2C data tied high via a 10K pullup.
I tried the following code
Code:
ANSELC = 0;
OpenI2C1(MASTER,SLEW_OFF);
SSP1ADD = 0x09;
while (1)
{
WriteI2C1(255);
i = 1;
}
Is there something else that I am missing?
Do I need an active slave to see output from the master???
Last edited: