# I2C Problem

**URL:** <https://community.sparkfun.com/t/i2c-problem/4381>\
**Category:** MicroMod\
**Tags:** msp\
**Created:** [May 14, 2007, 12:24am UTC](https://community.sparkfun.com/t/i2c-problem/4381 "2007-05-14T00:24:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GADOMSKI](https://avatars.discourse-cdn.com/v4/letter/g/b5a626/32.png) [@GADOMSKI](https://community.sparkfun.com/u/GADOMSKI)\
**Post date:** [May 14, 2007, 12:24am UTC](https://community.sparkfun.com/t/i2c-problem/4381/1 "2007-05-14T00:24:16Z")

</div>

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! 😃

-Stefan

---

<div class="post-metadata">

**Author:** ![jasonharper](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jasonharper/32/12350_2.png) [@jasonharper](https://community.sparkfun.com/u/jasonharper)\
**Post date:** [May 14, 2007, 1:58am UTC](https://community.sparkfun.com/t/i2c-problem/4381/2 "2007-05-14T01:58:22Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Crane](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Crane](https://community.sparkfun.com/u/Crane)\
**Post date:** [May 14, 2007, 11:35am UTC](https://community.sparkfun.com/t/i2c-problem/4381/3 "2007-05-14T11:35:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GADOMSKI](https://avatars.discourse-cdn.com/v4/letter/g/b5a626/32.png) [@GADOMSKI](https://community.sparkfun.com/u/GADOMSKI)\
**Post date:** [May 14, 2007, 10:32pm UTC](https://community.sparkfun.com/t/i2c-problem/4381/4 "2007-05-14T22:32:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GADOMSKI](https://avatars.discourse-cdn.com/v4/letter/g/b5a626/32.png) [@GADOMSKI](https://community.sparkfun.com/u/GADOMSKI)\
**Post date:** [May 15, 2007, 8:46pm UTC](https://community.sparkfun.com/t/i2c-problem/4381/5 "2007-05-15T20:46:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Crane](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Crane](https://community.sparkfun.com/u/Crane)\
**Post date:** [May 16, 2007, 3:40am UTC](https://community.sparkfun.com/t/i2c-problem/4381/6 "2007-05-16T03:40:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GADOMSKI](https://avatars.discourse-cdn.com/v4/letter/g/b5a626/32.png) [@GADOMSKI](https://community.sparkfun.com/u/GADOMSKI)\
**Post date:** [May 16, 2007, 3:59am UTC](https://community.sparkfun.com/t/i2c-problem/4381/7 "2007-05-16T03:59:44Z")

</div>

got it. thanks for the help crane!
