Jump to content
kamalesh

UART using MSP430FR2311

Recommended Posts

 I am using a MSP430FR2311 launch pad and  i am trying to send AT commands through RX and TX to SIM800 and Receive Response from the SIM800 module. But am not able to get the response and not able to use SoftwareSerial in Energia for MSP boards. Can Anyone help with this problem ? Thank you in advance.

#include <String.h>

void setup()

{

 pinMode(RED_LED , OUTPUT);

Serial.begin(9600);

//Serial.print(F("AT\r"));
while(Serial.available()==0);
    val1 = Serial.readString();
   Serial.print(val1);
   Serial.print("\r");
    delay(100);
}

void loop(){
    //do nothing
  if(Serial.available())
  {
 String val2 = Serial.readString();
      line += String(val2);
      Serial.print(line);
 if (line.indexOf("OK") >= 0)
{   
    digitalWrite(RED_LED,HIGH);
    
  }  
 }
}

Since we cant use both the Debugging UART (Serial Monitor) and Application UART (TX and RX)  at the same time , I am checking the received Response for the string "OK" . and if OK is there the RED led goes high.

Share this post


Link to post
Share on other sites

The FR2311 only has one UART. To be able to use pins 3 and 4 with an external device you have to remove the RX/TX jumpers from the board. Note that you will not be able to both communicate with the SIM800 and do debug to the Serial terminal.

Is there any specific reason to use the FR2311? If not, then I would suggest upgrading to a MSP-EXP430F5529LP LaunchPad: This LaunchPad has 2 serial interfaces. You can then use Serial.xyz for debugging and Seria1.xyz for communicating with the SIM800.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×