DogLover 0 Posted February 11, 2013 Share Posted February 11, 2013 I am running into space issues. I used the Arduino Ping example and it says that I am 46 Bytes over on the rom. How can I fix this? Do I need to streamline the code? By the way I have a MSP430G2553 IC on the board. Thanks in advance! -DogLover Quote Link to post Share on other sites
Rickta59 589 Posted February 11, 2013 Share Posted February 11, 2013 Can you provide a url to which ping example? Seems to be a few. Quote Link to post Share on other sites
DogLover 0 Posted February 11, 2013 Author Share Posted February 11, 2013 Technically I didn't get it online. I opened up the Arduino programmer and went to File > Examples > 06 Sensors > Ping. That is how I found it. In the code example it gives this URL: http://www.arduino.cc/en/Tutorial/Ping I hope that helps! Quote Link to post Share on other sites
Rickta59 589 Posted February 11, 2013 Share Posted February 11, 2013 Are you sure you have the msp430g2553 selected? Look under Tools/Board menu and select the g2553. This script fails on the msp430g2231 ( default ) but is fine on the g2553. Quote Link to post Share on other sites
Rickta59 589 Posted February 11, 2013 Share Posted February 11, 2013 BTW: most msp430 are 3.3v device that aren't 5v tolerant. You will have to cut the signal voltage down to 3.3 to use it on the msp430 without damaging the pins. Quote Link to post Share on other sites
DogLover 0 Posted February 11, 2013 Author Share Posted February 11, 2013 Ah, yes! I didn't see that! Thanks a million! That worked. By the way what exactly is the difference between a 1mhz and a 16 mhz. Does that have to do with the amount of space a chip can hold? Quote Link to post Share on other sites
DogLover 0 Posted February 11, 2013 Author Share Posted February 11, 2013 Hmm. The code loaded correctly, but the ping sensor's LED isn't showing that it is working. Also, how can I get the measurements from the ping sensor to a LCD display or my PC? Thanks!! Quote Link to post Share on other sites
Rickta59 589 Posted February 11, 2013 Share Posted February 11, 2013 By the way what exactly is the difference between a 1mhz and a 16 mhz. Does that have to do with the amount of space a chip can hold?The msp430 chips can run the CPU at many different speeds. Running at 1MHz means your instructions work at 1/16th the speed of a chip running at 16MHz Quote Link to post Share on other sites
Rickta59 589 Posted February 11, 2013 Share Posted February 11, 2013 Also, how can I get the measurements from the ping sensor to a LCD display or my PC?Serial.print("some variable value:"); Serial.println(someVariable); Quote Link to post Share on other sites
legailutin 11 Posted February 11, 2013 Share Posted February 11, 2013 Hi DogLover, Transitioning from Arduino eh! I was there at one point. Anyway, 1mhz or 16mhz is the speed at which you want to run your processor. The msp430g2553 is fairly capable and can run at up to 16mhz. So, nothing to do with the space on your chip. I addition, you'll find out that the msp430g2553 has 16kb of flash space for the code that you write on the chip vs. 2kb for the 2231 variant. Meaning if you don't select the proper board, you'll run out of space. Hope this helps. Quote Link to post Share on other sites
Rickta59 589 Posted February 11, 2013 Share Posted February 11, 2013 but the ping sensor's LED isn't showing that it is workingHow did you wire up your Ping sensor? Where are you getting the 5V? How are you reading and writing the signal pin using 3v3? Quote Link to post Share on other sites
energia 484 Posted February 12, 2013 Share Posted February 12, 2013 The ping is pretty much the same as the HC-SR04 Lonnie has a tutorial about how to hook it up to the MSP430. Lonnie chose to ignore the 5 volt intolerance of the msp430 and hasn't fried an MSP430 yet. Yoking aside, the MSP430 really is 5Volt intolerant and subjecting any of it's IO's to a voltage 10% higher than the supply voltage will eventually damage it. The easiest and cheapest way is to supply the PING with 5 Volt from the USB connector as Lonnie shows in his video and then use a resistor divider to step down to 3.3 Volt. Watch the video first then read the tutorial. http://www.meanpc.com/2012/09/using-hc-sr04-ultrasonic-sensor-with-ti.html 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.