Sal 0 Posted October 10, 2013 Share Posted October 10, 2013 It appears that there is a bug with Energia, some driver, or my computer. When I try to send anything from the MSP430 to my laptop over the serial port, the data gets corrupted in a systematic way. All bits are duplicated in place and then a zero is appended to the end of the bits. For example, if I send across a 1 (0b1), it becomes 6 (0b110), and if I send across a 2 (0b10), it becomes 24 (0b11000). Below, I have a basic Hello World example that captures the problem pretty clearly. Please let me know if you can replicate the problem and/or have a solution. Processing code: import processing.serial.*; void setup() { println(Serial.list()); String portName = Serial.list()[8]; // change to your USB port's Serial myPort = new Serial(this, portName, 9600); } void draw(){} void serialEvent(Serial myPort) { String text = myPort.readString(); print(text); } MSP430/Arduino Code: void setup() { Serial.begin(9600); } void loop() { Serial.println("Hello World!"); delay(1000); } Quote Link to post Share on other sites
Rickta59 589 Posted October 10, 2013 Share Posted October 10, 2013 Are you really using a g2231? Quote Link to post Share on other sites
Rickta59 589 Posted October 10, 2013 Share Posted October 10, 2013 https://github.com/energia/Energia/commit/6ea4fee17c54d55cbf75bf80328da6965a5c7ca6 .. this checkin did away with the comment that let people know the msp430g2231 chips max out at 4800 https://github.com/energia/Energia/blob/master/hardware/msp430/cores/msp430/TimerSerial.cpp#L108 .. Actual code that forces 4800 max for msp430g2231 chips https://github.com/energia/Energia/pull/78 .. the discussion that tells you why we ended up with this solution -rick 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.