Jump to content

UART interface to sim900

Recommended Posts

Im trying to send sms message by sending AT commands from MSP40F5529 to SIM900 (by Simcom).
physical connections: Rx(P3_4) to Tx, Tx(P3_3) to Rx, GND to GND.
When I plug the micro-usb cable and turn the serial monitor on ,I can see the commands and messages well.

I scoped the signal from the UART pins of the MSP and I saw noting changes (constant 0) - the pins do not react to my code.

this is my code (i print int 55 in order to see some changes in the uart pins value ,which didnt happend) :

void setup(){

void sendsms(){
Serial.println("AT+CMGF = 1\r");
Serial.println("AT+CMGS =\"+972****844095\"\r"); //my phone number
Serial.println("HELLO WORLD");

void loop() {

1. do i need to configure my UART pins in setup() or its done automatically when I use Serial? because I didn't declare anything
2. When I plug the usb cable - the serial reading and writing from the UART pins are stopped? because i scoped both cases (with and without usb cable) and the results were different
3. Why is the serial monitor shows all fine and when i scope the signals , the voltage value does not change? do i need to use some special library?


Looking forward for help.
Thank you

Link to post
Share on other sites

There are two hardware UARTs on the F5529.  See the Energia pin diagram here.  Note that P3_4 and P3_3 are designated as RX(1) and TX(1) respectively.  RXD and TXD are connected to P4_5 and P4_4 on the header with the jumpers.  When you specify Serial in Energia it is using P4_5 and P4_4.

Quoting from the Energia reference on the Serial Library:


Depending on your hardware you may have more than one pair of UART pins. By default, you can use “Serial” when using UART. You can use additional UART pins by calling “Serial1, Serial2, …” etc.

To use pins P3_4 and P3_3, specify Serial1 instead of Serial.

Link to post
Share on other sites

Amazing, thank you! I just moved the connectios to the RXD and RXD and it works

Only one more issue:
I want to watch the serial communication through the monitor. i can not see nothing there. I have 2 options (COM3 and COM4). none of them works.
Any suggestions?


Thank you!!!

Link to post
Share on other sites
  • 3 months later...

Is the RXD and TXD jumpers connected vertically or horizontally. ...?

If its connected horizontally , you cant see anything in Serial monitor. If it is connected Vertically its like tapping the connection . You can use both Application UARt and can see using the Serial monitor. 

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.

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...