uberhacker12 0 Posted February 27, 2013 Share Posted February 27, 2013 First post!!!! I want to enable internal pull-ups for i2c on pins P1_6 and P1_7. A search on existing discussion on this topic yielded this: http://forum.43oh.com/topic/2641-i2c-lcd/ "I2C requires a pull up resistor on both SCL and SDA. You can enable the internal pull up in the msp430 on the I2C lines by doing: pinMode(P1_6, INPUT_PULLUP); pinMode(P1_7, INPUT_PULLUP);" Is that right? I tried it and it does not work. I was wondering that i2c SDA is bidirectional so setting pinmode as INPUT might not be the right thing. Has anyone tested this and gotten it to work without external pull-up resistors. Thanks in advance, Quote Link to post Share on other sites
spirilis 1,265 Posted February 27, 2013 Share Posted February 27, 2013 All depends on how fast your I2C bus is going. It should work if you run it REALLY slow... like 10KHz (I'm not sure that Energia lets you set that though). Otherwise just add external 4.7K pullups. Quote Link to post Share on other sites
uberhacker12 0 Posted February 27, 2013 Author Share Posted February 27, 2013 Thanks spirilis. I am just using the energia Wire library and not playing with frequency at all. What is the default clock frequency ? Quote Link to post Share on other sites
spirilis 1,265 Posted February 27, 2013 Share Posted February 27, 2013 Looks like 100KHz. That's pretty standard for compatibility with most I2C-capable chips & gadgets. I recommend going the external pullup resistor route if at all possible. Quote Link to post Share on other sites
uberhacker12 0 Posted March 3, 2013 Author Share Posted March 3, 2013 Thanks spirilis once again. I confirmed your frequency number of 100 Khz on the scope to be correct. Did you infer it from the energia libraries ? Also I put the external resistors and my problem is resolved. Two followup questions: The MSP430G2553 spec says that there are internal pullup/pull down resistors available on Port 1. Does any one know their value ? Can these resistors be enabled using CCS if not energia. Thanks in advance, Quote Link to post Share on other sites
roadrunner84 466 Posted March 4, 2013 Share Posted March 4, 2013 Their value is about 300k is my experience. They can be enabled on gpio with the PxREN registers. 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.