Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] GSM communication not perform correctly

Status
Not open for further replies.

ankiterect

Newbie level 4
Newbie level 4
Joined
Nov 16, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
41
hello please find the error and please help me

Code:
void main()
{
UART1_Init(9600);
UART1_Write_Text("AT");
DELAY_MS(2000);
UART1_Write(0x0D);
DELAY_MS(2000);
UART1_Write_Text("AT+CMGF=1");
DELAY_MS(1000);
UART1_Write(0x0D);
DELAY_MS(2000);
UART1_Write_Text("AT+CMGW=7877709590");
DELAY_MS(2000);
UART1_Write(0x0D);
DELAY_MS(2000);
UART1_Write_Text("Hiiii");
DELAY_MS(2000);
UART1_Write(0x0D);
DELAY_MS(2000);
UART1_Write(0x26);
DELAY_MS(2000);
UART1_Write(0x0D);
DELAY_MS(2000);
UART1_Write_Text("AT+CMSS=1");
DELAY_MS(1000);
UART1_Write(0x0D);
DELAY_MS(2000);
}
 

Try this


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
void main()
{
    //If using PIC then add TRISC = 0x80; here
    UART1_Init(9600);
    Delay_ms(200);
 
    UART1_Write_Text("AT\r\n");
    DELAY_MS(2000);
    UART1_Write_Text("AT+CMGF=1\r\n");
    DELAY_MS(2000);
    UART1_Write_Text("AT+CMGS=\"7877709590\"");
    DELAY_MS(2000);
    UART1_Write_Text("Hiiii");
    UART1_Write(0x0D);
    UART1_Write(0x26);
    UART1_Write(0x0D);
 
    while(1);
}

 

try this code it's working for SIM300 modem

uart1_init(9600);
delay_ms(400);
//ra4_bit=0;

uart1_write_text("AT");
uart1_write(10);
uart1_write(13);
delay_ms(1000);

uart1_write_text("AT+CMGF=1");
uart1_write(10);
uart1_write(13);
delay_ms(1000);

uart1_write_text("AT+CSDH=1");
uart1_write(10);
uart1_write(13);
delay_ms(1000);

uart1_write_text("AT+CSMP=17,167,0,0");
uart1_write(10);
uart1_write(13);
delay_ms(1000);

uart1_write_text("AT+CMGS=\"+91___________\"");// insert ur Number here
uart1_write(10);
uart1_write(13);
delay_ms(1000);

uart1_write_text("Hi.......");
uart1_write(0x1A);
delay_ms(5000);
 
Last edited:
why use this line
uart1_write(0x1A);
 

It's the Hex notation of the CTRL+Z character which must be sent directly after typing your message.
Refer to the AT+CMGS command documentation.
 

why we use this line
uart1_write_text("AT+CSMP=17,167,0,0");
what is the meaning of 17,167,0,0
 

these commands r used for setting text mode of modem

i have purchased SIM 300 module but i am confused that which type of GSM sim require for this module.can i use the same sim which i am using for my mobile phone or some other connection.
 

i have purchased SIM 300 module but i am confused that which type of GSM sim require for this module.can i use the same sim which i am using for my mobile phone or some other connection.

yes....u can use same sim which is used in mobile...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top