xujianningkp 0 Posted June 20, 2014 Share Posted June 20, 2014 Hi all, I'm trying to make a communication between TM4C129 Connected Launchpad and TM4C123 Launchpad (or Arduino UNO) via I2C ports. 1.5K pull-up resisters are added to both SCL and SDA. Connected both grounds. I have the salver_sender example code loaded to the Connect Launchpad and the master_reader example code to Arduino UNO. The Arduino UNO got some weird characters yyyyyy from the Connect Launchpad and the loop stuck on Wire.requestForm() every time. Arduino gets these yyyyyy only if I pushed the reset button on the Connected Launchpad or disconnect the SCL and SDA to make the loop run continuously (but no data is sending). I changed the setModule(); to different I2C ports but they all did the same. I tried the TM4C123 Launchpad (instead of the Connected Launchpad) with and Arduino with the same setup and codes, they works perfectly without any issue. Please help me out if you have any idea or info. I appreciate your time Result from TM4C129 Connected Launchpad and Arduino: send request.......request sent! Quote Link to post Share on other sites
Rei Vilo 695 Posted June 20, 2014 Share Posted June 20, 2014 First, you need to add a logic converter between Arduino (5V) and LaunchPad (3.3V). Second, you need to add Wire.read() to empty the buffer. Third, 1.5k seems a low value for the pull-up resistor. Just calculate the implied current using the U = R Quote Link to post Share on other sites
NickTompkins 4 Posted June 20, 2014 Share Posted June 20, 2014 Reading what he is saying is that he is using 2 Launchpads.... Quote Link to post Share on other sites
abecedarian 330 Posted June 20, 2014 Share Posted June 20, 2014 Reading what he is saying is that he is using 2 Launchpads....Also mentions using an Arduino too: I tried the TM4C123 Launchpad (instead of the Connected Launchpad) with and Arduino with the same setup and codes, they works perfectly without any issue. Maybe some more information is in order? Like: Setup 1 using TM4Cxxxxxx with TM4Cyyyyy results in ZZZZZZ output; Setup 2 using TM4Cxxxxxx with Arduino... and so on. Quote Link to post Share on other sites
xujianningkp 0 Posted June 20, 2014 Author Share Posted June 20, 2014 First, you need to add a logic converter between Arduino (5V) and LaunchPad (3.3V). Second, you need to add Wire.read() to empty the buffer. Third, 1.5k seems a low value for the pull-up resistor. Just calculate the implied current using the U = R Quote Link to post Share on other sites
abecedarian 330 Posted June 21, 2014 Share Posted June 21, 2014 One thing to consider is that although the 129LP has two groups of booster pack headers, and those provide the same functionality as most every other booster pack header, changes to the code may be needed when porting from one LP to another. For instance, if you reference PB_4 / A10 on the TM4C123 LP, that is pin 7 on the booster pack header, but PB_4 / A10 is pin 63 on BP2 on the TM4C1294 LP; a totally different pin. So even common, generic pin names may move around. Something to pay attention to. Quote Link to post Share on other sites
abecedarian 330 Posted June 21, 2014 Share Posted June 21, 2014 To add, even though the 'booster pack' headers are 'standard', it appears they aren't that standard at all. If you compare the 1294NCPDT LP ... with the Stellaris LM4F120 / Tiva TM4C123GXL LP ... there really isn't that much in common no matter how you look at them. Quote Link to post Share on other sites
Rei Vilo 695 Posted June 22, 2014 Share Posted June 22, 2014 To add confusion to the matter, some pins are linked via 0 ohm shunts. Please refer to the pins map for the X11 connector. Quote Link to post Share on other sites
L.R.A 78 Posted June 22, 2014 Share Posted June 22, 2014 So far i've been able to use I2C0 with no problem at all (in energia at least). I actualy think it works much more solid than older versions of energia. I don't remember if i tested other I2C modules About this: #ifdef __TM4C1294NCPDT__{GPIO_PB2_I2C0SCL, GPIO_PB3_I2C0SDA}, //I2C(0) IS CORRECT{GPIO_PN5_I2C2SCL, GPIO_PN4_I2C2SDA}, //PN5 AND PN4 ARE USING BY 12C(1) BASE ON THE ENERGIA LAYOUT{GPIO_PA2_I2C8SCL, GPIO_PA3_I2C8SDA}, //THERE IS NO I2C(8) ON THE ENERGIA LAYOUT{GPIO_PD0_I2C7SCL, GPIO_PD1_I2C7SDA} //THERE IS NO 12C(7)#endif this is right. There isn't anytigh rong with this, This is the right definitions in the uControler datasheet. Energia layout says I2C2_BASE is used with setModule(1); The image is adapted to Energia fuctions not the "real" I2C modules If you look at the datasheet page 1277 of tm4c1294ncpdt then you will see this 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.