AnsweredAssumed Answered

Can't get I2C working

Question asked by rebbe.david on Mar 15, 2012
I'm trying to get I2C working, I've verified I can manually toggle the pins at 400KHz with a pull up resistor. I can't seem to get the I2C code to work correctly though.

    input_clock = CLK_GetClockFreq()/1000000;
    while (1)
        while (I2C_GetFlagStatus(I2C_FLAG_BUSBUSY));
        while (!I2C_CheckEvent(I2C_EVENT_MASTER_MODE_SELECT));
        I2C_Send7bitAddress(0xA0, I2C_DIRECTION_TX);
        while (!I2C_CheckEvent(I2C_EVENT_MASTER_BYTE_TRANSMITTED));

The code always get stuck at "while (I2C_GetFlagStatus(I2C_FLAG_BUSBUSY));"

I've read the errata and don't really see anything similar to this. Also I currently don't have pull-up resistors on the lines while using this code, would this cause the I2C code to error out and always say its busy?