Microcontroller › PIC › reading sms from gsm modem and comparing with predefind one › i changed the steps, but i m
July 29, 2012 at 10:40 am
#8360
Participant
i changed the steps, but i m not getting the string…
+CMGR: “REC READ”,”+918108111649″,,”12/07/22,14:24:11+22″
Hello
OK
here is the pgm……
putrsUSART(“AT+CMGR=1”);
putcUSART(0x0D);
while(BusyUSART());
gets(a);
Delay1KTCYx(75);
putsUSART(a);
}
void gets(char *buffer)
{
unsigned char data;
do
{
while(!DataRdyUSART());// Wait for data to be received
data = getcUSART();
*buffer = data;
buffer++; // Increment the string pointer
}
while(data!=’K’);
*buffer=’