Jump to content

Recommended Posts

I am having RTC DS1307


I have used Energia IDE for programming.The code is working fine.I am facing one difficulties.


As soon as i remove sda and scl pin from microcontroller it stop reading  vlaues


I tried same code in arduino . when i disconnect it reads default values as 0.0.0(hour.min.sec)



how to check RTC working or not for MSP430G2 .

is there any way to check RTC reading the values or not














Link to post
Share on other sites

If I understand correctly then reading from the DS1307 is working fine and it prints the time. But as soon as you remove the SDA/SCL lines the code hangs and stops printing the time? Is that correct?


Can you post the Sketch you used?


I vaguely remember that if you try to read from I2C when there is not device present on the bus the I2C bus can indeed hang altogether.


I'll give it a try..

Link to post
Share on other sites

The USCI block gets into a funny state when SDA/SCL are floating (i.e nothing connected). The User Manual is pretty explicit about pullups on the I2C lines: "Both SDA and SCL are bidirectional, and must be connected to a positive supply voltage using a pullup resistor".


In your case, I would not worry about nothing being printed when you remove the device from the I2C bus. If you really want to have it execute normally then you can add a 10k pullup to the SDA and SCL lines.


Be careful with the 5v (TTL) since the MSP430 is a 3.3v (CMOS) device.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...