I2C Problem

Hey all,

I’m using a MSP430F169 and I’m trying to interface it to a Maxim real time clock (DS1337) using I2C. My 430 is sending a start bit, the address and a R/W signal. The RTC is sending back an ACK signal but while SDA is high. SDA should be low when an ACK is sent. Does anyone know a quick fix to this problem? Any help is much appreciated! :smiley:

-Stefan

GADOMSKI:
The RTC is sending back an ACK signal but while SDA is high. SDA should be low when an ACK is sent.

That makes no sense - an I2C ACK is defined as SDA being pulled low, therefore the master has to let SDA float high in order for that low to be detected.

I agree with Jason. The acknowledge bit is sent immediately by the peripheral. Look carefully at the address and command definition of the clock. I think your problem is there.

Crane

I figured out my problem, the correct device address was not being sent. Thanks for the help!

So now I am able to transmit data from the 169 (master) to the RTC (slave). However when I try to read data from the slave the master sends the slave address and the read bit but the slave sends nothing back and SCL stays low. Even more bizarre is the TXRDYIFG flag is being set. According to the user’s manual this should be unused in receive mode. Any ideas?

Some peripherals use a write command to set the peripheral address followed by immediately by a read command instead of write data.

Check out the peripheral operation again.

Crane

got it. thanks for the help crane!