11 years ago.

I2C on KL25Z not working

I wanted to test the I2C interface with a PCF8584A. The address is sent, but the data bytes are not output.

Here is my test program:

#include "mbed.h"
#include "PCF8574.h"

PCF8574 io(PTC9,PTC8,0x72);

int main() 
{
  
  while(1) 
  {
    io.write(0x00);
    wait(0.1);
  }
}

1 Answer

11 years ago.

Most likely cause with your description is that it does not receive an ACK on the address. Are you sure the address is correct? SDA and SCL not mixed up? You apparently see the address is sent, can you also see if an ACK is returned for the address?

Accepted Answer

SDA and SCL were reversed!

posted by Reinhold Schaefer 26 Sep 2013