psiddaveer 0 Posted December 16, 2014 Share Posted December 16, 2014 Hi guys, I'm trying to program my msp430g2553 using energia. My program is about 360 lines in arduino.. When I try to compile the code in energia, it shows errors that the ram is insufficient and about 834B more needed.. I can't reduce the no of variables and the only header I've used in liquidcrystal.h.. So is this a problem with program or I need to change the controller? Quote Link to post Share on other sites
abecedarian 330 Posted December 16, 2014 Share Posted December 16, 2014 @@psiddaveer Hard to say without seeing the code. If you have variables that don't change, maybe declare them as "CONST" so they get placed in flash. Try to avoid any floating point math. tripwire 1 Quote Link to post Share on other sites
asgard20032 9 Posted December 17, 2014 Share Posted December 17, 2014 If he is using liquidcrystal, he is surely using a lot of string. String can use up memory pretty fast : n+1 bytes (where n is the number of character and 1 is for null character) No one would do string processing on a mcu, so I guess he won't modify them. Just declaring all string to constant would resolve all of his issue. Quote Link to post Share on other sites
Rei Vilo 692 Posted December 17, 2014 Share Posted December 17, 2014 Go for the MSP430F5529 LaunchPad! Quote Link to post Share on other sites
psiddaveer 0 Posted December 19, 2014 Author Share Posted December 19, 2014 Thank you guys thank you for replying.. I was using an array of strings which were used as variables, now when I declared them as constant the ram is free now.. But I need to think of some other way to tick mark the particular index number of the particular array.. And also I need to transmit these strings serially.. So any suggestions for tick marking other than using 1 more array of type int ?? Quote Link to post Share on other sites
abecedarian 330 Posted December 19, 2014 Share Posted December 19, 2014 Can save a little bit of memory if you use uint_8 (unsigned 8-bit integer) instead of INT, if the value is never going to be < 0 or > 255. @@psiddaveer Might be easier to give advise if you post some code. 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.