Veeramani.T
New Member
hi ,
i am using 8051 for sending sms through gsm900.
i got the AT commands correctly in hyper terminal.
the problem is ......
manually i send the AT commands from hyperterminal to gsm900, the module is sending the sms to my mobile correctly.
but, gsm module is connected to MC , i could not get the sms.
and my hardware connections are correct- MC - Max232- Gsm900 ( checked it)
i dont know what is happening?
my code is ...
#include<reg51.h>
void serial_int()
{
TMOD=0x20;
TH1=0xfd;
SCON=0x50;
TR1=1;
}
void delay (unsigned int x)
{
unsigned int i,j;
for(i=0;i<x;i++)
{
for(j=0;j<1275;j++);
}
}
void serial (unsigned char s)
{
SBUF=s;
while (TI==0);
TI=0;
}
void send (char *z)
{
unsigned int k;
for(k=0;z[k]!=0;k++)
{
serial (z[k]);
}
}
void main()
{
serial_int();
send ("AT\r\n");
delay(200);
send ("AT+CMGF=1\r\n");
delay(200);
send ("AT+CMGS=\"+91xxxxxxxx;\"\r\n");
delay(200);
send ("This is my message");
serial (0x1a);
while (1);
}
pls help me !!!!....
i am using 8051 for sending sms through gsm900.
i got the AT commands correctly in hyper terminal.
the problem is ......
manually i send the AT commands from hyperterminal to gsm900, the module is sending the sms to my mobile correctly.
but, gsm module is connected to MC , i could not get the sms.
and my hardware connections are correct- MC - Max232- Gsm900 ( checked it)
i dont know what is happening?
my code is ...
#include<reg51.h>
void serial_int()
{
TMOD=0x20;
TH1=0xfd;
SCON=0x50;
TR1=1;
}
void delay (unsigned int x)
{
unsigned int i,j;
for(i=0;i<x;i++)
{
for(j=0;j<1275;j++);
}
}
void serial (unsigned char s)
{
SBUF=s;
while (TI==0);
TI=0;
}
void send (char *z)
{
unsigned int k;
for(k=0;z[k]!=0;k++)
{
serial (z[k]);
}
}
void main()
{
serial_int();
send ("AT\r\n");
delay(200);
send ("AT+CMGF=1\r\n");
delay(200);
send ("AT+CMGS=\"+91xxxxxxxx;\"\r\n");
delay(200);
send ("This is my message");
serial (0x1a);
while (1);
}
pls help me !!!!....
Last edited: