fretless 0 Posted April 17, 2014 Share Posted April 17, 2014 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? Quote Link to post Share on other sites
gwdeveloper 275 Posted April 18, 2014 Share Posted April 18, 2014 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/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.