11 years, 1 month ago.

I2C communication with freedom board

Can somebody help me to figure out how to setup I2C on freedom board. I take an example I2C Debug for realterm. This example work perfectly with LPC1768 board On Freescale board I setup communication with PTC9 and PTC8 for SDA and SCL I compile it with KL25Z option and I get initial messages on my terminal. But I2C doensn't work on it. Thank you for help

Hi, please can you provide more information such as:

  • the code you are using
  • your hardware (pull up resistors)

Cheers, Sam

posted by Samuel Mokrani 07 Mar 2013

This code work with LPC1768: DigitalOut myled(LED1); Serial pc(USBTX, USBRX); I2C i2c(p9,p10);

This code doesn't work with KL 25Z: DigitalOut myled(LED1); Serial pc(USBTX, USBRX); I2C i2c(PCE9,PCE8); I receive NACK after every I2C transition on a bus

I have 4,7k pullup resistors between SDA,SCL and 3.3 V Thank you for help

posted by Dima Ostrenko 07 Mar 2013

Please can you post all your code using the <<code>><</code>> tag. It will be easier for other people to help you. Which peripheral do you want to access over I2C (accelerometer, temperature sensor, ...)

posted by Samuel Mokrani 07 Mar 2013
Be the first to answer this question.