hamada 0 Posted June 13, 2013 Share Posted June 13, 2013 I just got a launchpad (MSPEXP430G2) and been playing with Examples code and they all load fine under Linux. But I can't get any code that sample that use serial communication to work with MSP430G2452/2553 under Linux or Windows(virtualbox), like this one below: Are all the supplied samples working or some of them still not ported to the MSP? /* ASCII table Prints out byte values in all possible formats: * as raw binary values * as ASCII-encoded decimal, hex, octal, and binary values For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII The circuit: No external hardware needed. created 2006 by Nicholas Zambetti modified 30 Aug 2011 by Tom Igoe This example code is in the public domain. <http://www.zambetti.com> */ void setup() { Serial.begin(9600); // msp430g2231 must use 4800 // prints title with ending line break Serial.println("ASCII Table ~ Character Map"); } // first visible ASCIIcharacter '!' is number 33: int thisByte = 33; // you can also write ASCII characters in single quotes. // for example. '!' is the same as 33, so you could also use this: //int thisByte = '!'; void loop() { // prints value unaltered, i.e. the raw binary version of the // byte. The serial monitor interprets all bytes as // ASCII, so 33, the first number, will show up as '!' Serial.write(thisByte); Serial.print(", dec: "); // prints value as string as an ASCII-encoded decimal (base 10). // Decimal is the default format for Serial.print() and Serial.println(), // so no modifier is needed: Serial.print(thisByte); // But you can declare the modifier for decimal if you want to. //this also works if you uncomment it: // Serial.print(thisByte, DEC); Serial.print(", hex: "); // prints value as string in hexadecimal (base 16): Serial.print(thisByte, HEX); Serial.print(", oct: "); // prints value as string in octal (base 8); Serial.print(thisByte, OCT); Serial.print(", bin: "); // prints value as string in binary (base 2) // also prints ending line break: Serial.println(thisByte, BIN); // if printed last visible character '~' or 126, stop: if(thisByte == 126) { // you could also use if (thisByte == '~') { // This loop loops forever and does nothing while(true) { continue; } } // go on to the next character thisByte++; } Quote Link to post Share on other sites
semicolo 39 Posted June 14, 2013 Share Posted June 14, 2013 Works for me on windows, did you set the jumpers to the hw settings? Quote Link to post Share on other sites
afonso360 0 Posted June 16, 2013 Share Posted June 16, 2013 im facing the same problem, i cant get anything over serial, i tried with the jumpers switched like it says on the wiki, i also tried with another serial monitor software and it didnt work, i have the rev1.5 and using the g2553 but im on windows. Quote Link to post Share on other sites
semicolo 39 Posted June 17, 2013 Share Posted June 17, 2013 @@afonso360 do you see a new serial port when you plug your MSP430 launchpad? Is there a device missing drivers in the windows device manager? Quote Link to post Share on other sites
hamada 0 Posted June 17, 2013 Author Share Posted June 17, 2013 Finnaly, I found solution: Once programmed you need to unplug and keep reset button on launchpad pressed a few seconds to led kernel enough time to load the module, before pluging the usb cable again. instead of using Energia serial monitor (which is buggy) I used Putty which has version for windows and Linux with following config in screenshot below Quote Link to post Share on other sites
afonso360 0 Posted June 17, 2013 Share Posted June 17, 2013 Well i got it to work by installing the ccs and trying what hamada said thanks to everyone 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.