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 SCL and SDA ALWAYS HIGH,BUSY FLAG IS ALWAYS HIGH

Other Parts Discussed in Thread: MSP430G2553, DRV10983

Hi friends,

This is the first time am doing I2C so kindly help ,or suggest me.from few days am searching the forum to find related problem and solution I have gone through few threads all are having almost same problems but still i didn't find the solution

Controller:MSP430G2553

Aim:For now i just want to see start ,address in scope,program is I2C MasterTx Code (TI sample code)

problem:always SCL,SDA lines are high,UCBBUSY is set.

MSP-EXP430G2,launch pad for programming the controller,and am checking in debug mode

am attaching sample code

msp430g2xx3_uscib0_i2c_06.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* --COPYRIGHT--,BSD_EX
* Copyright (c) 2012, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

i have tried all suggestions in the previous threads related to the problem but didnt find any solution.

whoever has faced this same problem and solved it later.kindly suggest me how that problem has solved.

Thank you in advance

  • Hello Shruthi,

    Are you sure that you're using 10k pullup resistors as shown in the demo description? If the resistance values are too low the MSP430 will be unable to pull the line low. Have you tried using the example code as intended, with a second Launchpad loaded with the i2c_07 code?

    Regards,
    Ryan
  • Hi Ryan,

    Thank you for the reply

    Yes am using 10k resistors,but hardware is different ,am not using slave ,i just want to ensure i2c is working so i want to observe  start and address in the scope ,my actual project is DRV10983 which requires i2c communication to write into registers ,but it is not working so i came to basic and trying to sort it. Pl find the attachment.,sch.tif

    Thank you

  • Hey Shruthi,

    I replicated the setup using a Launchpad where both 1.6 (SCL) and 1.7 (SDA) are pulled up to Vcc with a 10k resistor each.  I also removed the P1.6 jumper that connected the pin to LED2.  There is no slave device connected.  The attached image shows my i2c lines operating properly, the purple signal is SCL and blue is SDA.

    Hope this helps,

    Ryan

  • Hi Ryan,

    Thanks for that
    But am not testing it on launch pad,could you pl suggest what might be the problem.

    Thank you in advance.

  • Hi Shruthi,

    I understand that you aren't testing on the Launchpad, I was just explaining to you my setup in order to get the intended results.

    Do you have the necessary 10 uF and 100 nF capacitors to ground on the Vcc line, as close to the MSP430 as possible?

    Regards,
    Ryan
  • yeah i have kept capacitor between VCC to GND  near MSP430 (forgot to mention in the schematic) but only 104pf

  • 104 pF? That's much too small, you really should increase it to the recommended 10.1 uF. Can you add in code to output onto a pin (P1.0 for example) and make sure that the MSP430 is turning this pin on? I'm wondering if the device is not being powered on correctly or is in a state of reset. Make sure your RST pin is pulled high.

    Ryan
  • i will do the changes you told me and will update you ,but is it the same sample program?there are no changes in the sample code(msp430g2xx3_uscib0_i2c_06)?
  • I used the same code described, it is the exact same as the demo provided by TI and works on my Launchpad without any issues.

    Ryan
  • Hi Ryan,
    Thank you very much,i got the output.it is working perfectly with the sample provided by TI  ,i think i have done some mistake in my pcb,there is no problem with controller ,even with 104pf it is working ,i should have found out it earlier it consumed lot of time :-( ,anyway thanks a lot for the response.

    regards,shruthi

  • I guess '104pF' means 10*10^4pF = 100nF, which is a common deblocking value. It's a typical marking on SMD caps (except on those cheap small ones that come with no markings at all) and through-hole caps. And SMD resistors

**Attention** This is a public forum