thanks irfan.......i was really confused here,,,,,,,,thanks alot
@irfan ahmad bro its again not working..... mcu is sending proper response to hyperterminal but not sending sms via gsm module....................
plz chk out my code
#include<stdio.h>
#include<reg51.h>
//Function to initialize RS232 Serial Port
void serial_init()
{
SCON=0x50; //setup for 8-bit data
TMOD=0x20; //setup timer 1 for auto-reload
TL1=0xFd; //setup for 9600 baud
TH1=0xfd; //Baud Rate 9600
TR1=1;
}
//This function displays a null-terminated string on the RS232 port
void send_serial(unsigned char *s)
{
while(*s!=0x0)
{
SBUF=*s;
while(!TI)
{
}
TI=0;
s++;
}
}
int i;
//Start of Main Program
void delay_ms(unsigned int);
main()
{
delay_ms(400);
serial_init(); //Initialize Serial port.
for(i=1;i<=2;i++)
{delay_ms(400);
send_serial("AT\r\n");
delay_ms(400);
send_serial("AT+CMGF=1\r\n");
delay_ms(400);
send_serial("AT+CMGS=\"7696240117\"\r\n");//my mob number here
delay_ms(400);
send_serial("gsm working\r\n");
delay_ms(400);
send_serial("0x1A\r\n");
delay_ms(400);delay_ms(400);delay_ms(400);delay_ms(400);
//send_serial("\"com test\"\r\n");
}
}
//generates delay in milli seconds
void delay_ms(unsigned int i)
{
unsigned int j;
while(i-->0)
{
for(j=0;j<500;j++)
{
;
}
}
}
if possible kindly test it......................
waiting 4 ur reply