Jump to content
43oh

I2C acting weird MSP430G2553


Recommended Posts

Hello,

 

I'v been trying to hook up a MPR121 capacitive touch sensor to the MSP430G2553 via I2C. I have encountered a problem.

 

This is the code for a transmission:

   Wire.beginTransmission(0x5C); //0b1011100
   Wire.write(0x5D); //0b01011101
   Wire.endTransmission(false);
   Wire.requestFrom(0x5C,1, true); 

This is how it should look ( in my opinion ):

START 1011100 0 0 01011101 0 START 1011100 1 0 SENSORDATA 1 STOP

However this is how it looks in reality:

START 1011100 0  0  01011110 0 START 1011100 0 0 START 1011100 1  0 00000000 1 STOP

Why are there 3 START's instead of 2? What kind of a packet is it after the second start?

Link to post
Share on other sites

The MPR121 generates two interrupts, one for press and the 2nd for release. You'll need your code setup to handle both or it gets screwy.

 

EDIT: Since you are using Energia.  Maybe try the Arduino library for the MPR121? http://bildr.org/2011/05/mpr121_arduino/

 

Other links:

http://forum.43oh.com/topic/1254-mpr121-interrupt-question/

http://forum.43oh.com/topic/3587-mpr121-touch-sensor-and-i2c-wire-library/

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