This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

i2c pin direction problem

Other Parts Discussed in Thread: TMS570LS1227

Hi All

I use i2c bus to drive two segment leds and one eeprom. I use tms570ls1227. I find that i2c(SDA and SCL) pin direction has no effect on the communication. I set both of them as output. It works perfectly then I set them as input, it can work as well. 

So I am wondering what the i2c pin direction  settings exactly used for?

My mcu is master all the time, so it will generate the clock all the time, I can understand scl pin should be output. But I have to be switch between receriver and transmitter, should the  sda pin direction change with it? I never manually change the direction of sda pin in my code. But is works. Can someone explain this for me?

RegardsLeo