ji231 0 Posted January 12, 2013 Share Posted January 12, 2013 As known LM4F120H5QR has 4 channel I2C. How to set channel number when writing sketch for Energia? I tried to find Wire.c for lm4f to look at realization, but without success. Need for interface betwwen LM4F and BMP085. For MSP430 work fine. Sorry my terrible English Quote Link to post Share on other sites
Rei Vilo 695 Posted January 13, 2013 Share Posted January 13, 2013 Use `setModule()` as described in https://github.com/energia/Energia/blob/master/hardware/lm4f/libraries/Wire/Wire.cpp#L599 void setup() { Wire.setModule(3); Wire.begin(); ... } Similar logic applies for UART and SPI. As an alternative, declare the variable as in https://github.com/energia/Energia/blob/master/hardware/lm4f/libraries/Wire/Wire.cpp#L161 TwoWire Wire2(2); MichelKohler and Xtagon 2 Quote Link to post Share on other sites
gwdeveloper 275 Posted January 14, 2013 Share Posted January 14, 2013 Wy do you need Energia? Here's code for the LM4F and the BMP085 http://forum.stellarisiti.com/index.php?/topic/432-Stellaris-Launchpad,-OLED-and-BMP085page__view__findpost__p__2029 Quote Link to post Share on other sites
AMPS 0 Posted February 27, 2013 Share Posted February 27, 2013 Is there any RTC liberary for Energia. so i can use to read and Write RTC date and time. please let me know how I2c address being specified Use `setModule()` as described in https://github.com/energia/Energia/blob/master/hardware/lm4f/libraries/Wire/Wire.cpp#L599 void setup() { Wire.setModule(3); Wire.begin(); ... } Similar logic applies for UART and SPI. As an alternative, declare the variable as in https://github.com/energia/Energia/blob/master/hardware/lm4f/libraries/Wire/Wire.cpp#L161 TwoWire Wire2(2); Quote Link to post Share on other sites
OppaErich 25 Posted June 28, 2014 Share Posted June 28, 2014 Hmm, no worky with Tiva 123. Serial monitor shows nothing and yes, I've tried all available serial ports. Quote Link to post Share on other sites
igor 163 Posted June 28, 2014 Share Posted June 28, 2014 Is there any RTC liberary for Energia. so i can use to read and Write RTC date and time. You might take a look at this library. http://forum.stellarisiti.com/topic/2026-calendar-mode-with-tm4c1294/ Also discussed in this thread. http://forum.stellarisiti.com/topic/2005-tm4c129-hibernation-rtc-and-calendar-mode/ Quote Link to post Share on other sites
Lyon 3 Posted June 28, 2014 Share Posted June 28, 2014 hibRTC.ino.zip You might take a look at this library. http://forum.stellarisiti.com/topic/2026-calendar-mode-with-tm4c1294/ Also discussed in this thread. http://forum.stellarisiti.com/topic/2005-tm4c129-hibernation-rtc-and-calendar-mode/ Hi, The libraries suggested are for tm4c1294 and should be used only with this micro controller. This is due to a special hardware (new), implemented in micro and which departs that one used in tm4C123. As noted, there is a bug in driverlib when you need to use the year and day of the week. The attached file highlight the place where the bug is and shows a correction: Quote Link to post Share on other sites
L.R.A 78 Posted July 8, 2014 Share Posted July 8, 2014 hibRTC.ino.zip Hi, The libraries suggested are for tm4c1294 and should be used only with this micro controller. This is due to a special hardware (new), implemented in micro and which departs that one used in tm4C123. As noted, there is a bug in driverlib when you need to use the year and day of the week. The attached file highlight the place where the bug is and shows a correction: i´m sorry i will update this to tm4c123 but i haven't realy had time. Gona try next week. It's a simple tweak so maybe if i get to anoyed at my exams i'll do it today ps: you haven't attatched any file for the bug Quote Link to post Share on other sites
Lyon 3 Posted July 8, 2014 Share Posted July 8, 2014 Hi L.R.A, The bug refers only on "calendar" mode on 129 micro controller. TM4C123 does not need that, because the calendar register does not exist there, so you do not need to modify something. As for "file for the bug" - yes I did not filed it - the bug is described in hibRTC.ino file, at the beginning - I used your file and just made modifications/updates and checked it out. Regards, L Quote Link to post Share on other sites
L.R.A 78 Posted July 8, 2014 Share Posted July 8, 2014 Hi L.R.A, The bug refers only on "calendar" mode on 129 micro controller. TM4C123 does not need that, because the calendar register does not exist there, so you do not need to modify something. As for "file for the bug" - yes I did not filed it - the bug is described in hibRTC.ino file, at the beginning - I used your file and just made modifications/updates and checked it out. Regards, L Yes i know that TM4C123 doesn't have it got to see that update the file in the libraries to fix that bug 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.