speedEC
Full Member level 6

Dear Sir,
I am using PIC18F452 MCU (MPLAB IDE v8.63 and MPLABC18 v3.37.01) to communicate SIMCOM300 GSM Modem. I connected and it works fine. But when I send SMS Command it gives error. I think I am doing wrong in sending string through USART. The code is follows.
*I have to send the Command as AT+CMGS="1234567890"
AT+CMGF=1 text mode enabled at start up. Also Echo off (ATE0) done at start-up.
The following code works (for Dialing):
I tried with store the phone number into strBuff_IncomingPhNum (data -ram - memory). [Declared as char strBuff_IncomingPhNum [11]].
But still I am getting error.
Can anyone help me to solve this issue? Advance thanks.
I am using PIC18F452 MCU (MPLAB IDE v8.63 and MPLABC18 v3.37.01) to communicate SIMCOM300 GSM Modem. I connected and it works fine. But when I send SMS Command it gives error. I think I am doing wrong in sending string through USART. The code is follows.
*I have to send the Command as AT+CMGS="1234567890"
Code C - [expand] 1 2 3 4 5 6 7 8 char strBuff_IncomingPhNum[11]; putrsUSART((const far rom char*)"AT+CMGS="); putcUSART(0x22); putrsUSART((const far rom char*)"9123456789"); //putsUSART(strBuff_IncomingPhNum); putcUSART(0x22); putcUSART(0x0D);
AT+CMGF=1 text mode enabled at start up. Also Echo off (ATE0) done at start-up.
The following code works (for Dialing):
Code C - [expand] 1 2 putrsUSART((const far rom char*)"ATD+123456789;"); putcUSART(0x0D);
I tried with store the phone number into strBuff_IncomingPhNum (data -ram - memory). [Declared as char strBuff_IncomingPhNum [11]].
But still I am getting error.
Can anyone help me to solve this issue? Advance thanks.