Jump to content
DeepakJ

I2C not working MSP430g2553 launchpad

Recommended Posts

Hai I'm a complete newbie to Energia and MSP430. I would like to get some help on a problem that I'm facing while interfacing MSP430 launchpad using I2C(it's not "a" problem, rather it is "THE" problem).

As mentioned above I'm using a MSP430-g2553 launchpad ver1.5 and currently I'm working on a project that requires interfacing two MSP430s with a Raspberry Pi. The protocol that I've chose is I2C due to it's simple hardware requirement and it's support for many devices at the same time. But then till now interfacing two MSP430s has been a faliture. I tried interfacing two MSPs on two launchpads. I've used the programs given as the example under the Wire menu (both the master sender-slave reciever and the master reciever-slave sender) and also another one that I've used with arduinos. I've tried connecting the two MSPs on the launchpads directly without pullups, with pullups on SCL line, SDA line and also with pullups on both the lines but in vain. And yes I've connected the ground pins of both the launchpads together. Again yes, both the boards with the MSPs work fine with normal i/o programs, pwm programs and serial communication programs(with the computer).

Also I tried to connect each MSP to a Raspberry Pi and to a bus pirate(both of them working perfectly with an arduino), with negetive results.

Had I missed something that I should've done..? Or am I doing something that is absolute stupid...? There are a couple of jumpers on the launchpad like RX,TX,test etc etc. Should I do something with them(based on my readings what I've understood is that they are used in the case of serial communication and not I2C). If anyone has interfaced MSPs together, please if you can help, it would be great. Anything like hints, tips, suggestions, advice etc etc(negetive or positive), anything, would be highly appriciated.

 

Thanks in advance :D

Share this post


Link to post
Share on other sites

Hi D,

 

Welcome to the party!

I've been trying to get I2C to work on the MSP430 devices for some time now with very limited success.

 

The best I've come to getting I2C to actually work in a real device situation in the Examples/TMP006 project in Energia.

This connects a Texas Instr. temperature measurement IC to the MSP and allows two way communications.

 

The examples from TI are pretty much worthless for me since they assume 1. That your MSP will only transmit or receive, but

never do both in the same program, and 2. That I2C communications is all that your MCU will ever be doing since their examples force

your MCU to go into a brain dead low power mode and only wake up when an I2C operation happens. 

 

The Energia examples are way better than anything TI offers.

 

Now if Energia would only offer a USB library so I could use the MSP430F5529 to transmit data.

 

Will

Share this post


Link to post
Share on other sites

@@DeepakJ, did you use the master sender and slave receiver unmodified? If you have modified them then it would help to post the 2 Sketches that you have used. I will runs some tests next week when I have access to the hardware.

Share this post


Link to post
Share on other sites

Forgive if this is a naive question.  I don't want to trample down a hw/sw path that does not work.

 

Can someone please tell me if indeed it is possible with Launchpad MSP430g2553 w/ Energia (then XCodeEmbedded+ on top of that) to write a .ino sketch that does I2C in the same way it works on an Arduino Uno w/o Energia? i.e.:

#include <Wire.h>

 

void setup() {

     Wire.begin();

     Wire.requestFrom(ADDRESS, 2);  //assume ADDRESS is defined

}

 

if so, it seems there are difficulties in getting this interface to work.  Is there a list of difficulties with suggestions on resolutions (say a FAQ) for this?

 

thank you.

Share this post


Link to post
Share on other sites

When i dabbled into I2C it seemed that the hardware for it is really inflexible(it even contains bugs).

 

So i just made/adapted my own bit banging library. I don't care that it's bit banging because it's probably fast enough.

 

The bonus is that you can use it on any pins that you like.

 

https://github.com/amstan/binaryclock/blob/master/firmware/i2c.h

Share this post


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.

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