nirbar11 0 Posted August 9, 2017 Share Posted August 9, 2017 Hello 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(){ Serial.begin(9600); } void sendsms(){ Serial.println("AT\r"); delay(1000); Serial.println("AT+CMGF = 1\r"); delay(1000); Serial.println("AT+CMGS =\"+972****844095\"\r"); //my phone number delay(1000) Serial.println("HELLO WORLD"); delay(1000); Serial.println((char)26); delay(100); } void loop() { Serial.println(int(55)); //delay(200); sendsms(); } questions: 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 Nir Quote Link to post Share on other sites
Fmilburn 445 Posted August 9, 2017 Share Posted August 9, 2017 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: Quote 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. Quote Link to post Share on other sites
nirbar11 0 Posted August 10, 2017 Author Share Posted August 10, 2017 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!!! Quote Link to post Share on other sites
Fmilburn 445 Posted August 11, 2017 Share Posted August 11, 2017 Hard to say with the information you have given... The two sides of the RXD/TXD must be connected of course. Quote Link to post Share on other sites
kamalesh 0 Posted December 7, 2017 Share Posted December 7, 2017 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. 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.