Jump to content
43oh

MSP432 LP with xbee devices not transmitting or receiving


Recommended Posts

Hi, I am new to MSP432 and Xbee devices. I am trying to use the MSP432 and the Diji Xbee S1 to transmit and receive audio signals. However, I can't seem to transmit data over the Xbee. I just have the xbee module connected to pins: 3.3V, Ground, pin 3.3 transmitter and 3.2 receiver...

I have confirmed that the Xbee's communicate using XCTU.

 

Code:

 

void setup() {
Serial.begin(9600);// baud rate setting
}


void loop() {


  Serial.print("Failing");// send mic value over serial
  
  delay(100);// for testing




}
I can see the "Failing" showing up on the com port but not on the other xbee on the XTCU console screen. 
Any help would be much appreciated. 
Link to post
Share on other sites

I've only used the S2 parts, but think the S1 used the AT firmware - if it was a S2, I'd suggest making sure you have the appropriate firmware installed.

 

Are you using the sparkfun explorers to connect to your PC?  Can you a use a serial terminal program like putty/screen and get the two chatting by connecting a terminal to comX and another instance to comY, where x and y are the comports of the FTDI on the sparkfun?

 

I'm not clear what you mean when you say you can see failing show up on the comport - do you mean the MSPs com/serial port?

 

I've only played with xbee's on Arduino, but there's a limitation on AVRs with only one hardware UART.  You needed to define two pins with software serial to bitbang the connection to the xbee.  You then can watch the MCUs serial connection, on say pins 0 and 1, and connect the xbee to software serial pins 2 and 3.  

 

The fact that you can see 'Failing' somewhere means to me that you're not serial printing to the xbee - just the USB uart connected to the MSP432.

Link to post
Share on other sites

I've only used the S2 parts, but think the S1 used the AT firmware - if it was a S2, I'd suggest making sure you have the appropriate firmware installed.

 

Are you using the sparkfun explorers to connect to your PC?  Can you a use a serial terminal program like putty/screen and get the two chatting by connecting a terminal to comX and another instance to comY, where x and y are the comports of the FTDI on the sparkfun?

 

I'm not clear what you mean when you say you can see failing show up on the comport - do you mean the MSPs com/serial port?

 

I've only played with xbee's on Arduino, but there's a limitation on AVRs with only one hardware UART.  You needed to define two pins with software serial to bitbang the connection to the xbee.  You then can watch the MCUs serial connection, on say pins 0 and 1, and connect the xbee to software serial pins 2 and 3.  

 

The fact that you can see 'Failing' somewhere means to me that you're not serial printing to the xbee - just the USB uart connected to the MSP432.

I can't find any software serial examples for the MSP432, only the MSP430. So I don't know how to define the pins for this program... 

The two xbee can communicate just not through the energia code. 

Link to post
Share on other sites

You would use the standard Launchpad serial pins (J1, pins 3 and 4) to connect to your Xbee.  Assuming that you have initialized Serial1 with Serial1.begin(9600), you may also want to verify that the Xbee is running at 9600 baud as well with the same settings (8-N-1 for example) as the Launchpad.

Link to post
Share on other sites

For testing UART connected modules I modified the Energia "Examples->04.Communication->MultiSerial" to this bidirectional Serial Passthru program:

 

/*
  Multple serial test
 
  Receives from the main serial port, sends to the others.
  Receives from serial port 1, sends to the main serial (Serial 0).
 
  The circuit:
  * Any serial device attached to Serial port 1
  * Serial monitor open on Serial port 0:
 
  created 30 Dec. 2008
  by Tom Igoe
 
  This example code is in the public domain.
 
*/


void setup() {
  // initialize both serial ports:
  Serial.begin(115200);
  Serial1.begin(115200);
}
uint8_t inByte;

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    inByte = Serial1.read();
    Serial.write(inByte);
  }
  if (Serial.available()) {
    inByte = Serial.read();
    Serial1.write(inByte);
  }
}

 

which makes the Launchpad a simple TTL-Serial converter,  Serial is the USB port "/dev/ttyACM0" on my Linux box,  Serial1 is the hardware pins 3 (RX) & 4(TX)   The USB Serial connection on the MSP432 launchpad seems to be limited to 115200 baud max. 

 

Also, the launchpad will only output 3.3v and will be damaged by more than that coming in, is that compatible with your module?

 

B

Link to post
Share on other sites

For testing UART connected modules I modified the Energia "Examples->04.Communication->MultiSerial" to this bidirectional Serial Passthru program:

 

/*

  Multple serial test

 

  Receives from the main serial port, sends to the others.

  Receives from serial port 1, sends to the main serial (Serial 0).

 

  The circuit:

  * Any serial device attached to Serial port 1

  * Serial monitor open on Serial port 0:

 

  created 30 Dec. 2008

  by Tom Igoe

 

  This example code is in the public domain.

 

*/

 

 

void setup() {

  // initialize both serial ports:

  Serial.begin(115200);

  Serial1.begin(115200);

}

uint8_t inByte;

 

void loop() {

  // read from port 1, send to port 0:

  if (Serial1.available()) {

    inByte = Serial1.read();

    Serial.write(inByte);

  }

  if (Serial.available()) {

    inByte = Serial.read();

    Serial1.write(inByte);

  }

}

 

which makes the Launchpad a simple TTL-Serial converter,  Serial is the USB port "/dev/ttyACM0" on my Linux box,  Serial1 is the hardware pins 3 (RX) & 4(TX)   The USB Serial connection on the MSP432 launchpad seems to be limited to 115200 baud max. 

 

Also, the launchpad will only output 3.3v and will be damaged by more than that coming in, is that compatible with your module?

 

B

okay I ran this code onto my msp432 with the zigbee connected to the correct pins. How am I suppose to know if the zigbee is communicating? I need it to send information from the msp432 analog in pin to out through pin 4 of msp432 which is the tx of zigbee.

Link to post
Share on other sites

Not dumb. It would probably be safe to say that everyone on this board has had numerous "That was so obvious....why didn't I see that earlier" moments. Given the complexity of all this it is to be expected.  The challenges make it all the more rewarding when your project finally works as expected.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...