Microcontroller › PIC › HOME AUTOMATION USING GSM WITH PIC16f877a › hai kalil… i’m sending
January 21, 2013 at 5:43 am
#8998
nidhin.k
Participant
hai kalil…
i’m sending sms like -*a,*b,*c,*d,*e,*f,*g,*h
while receiving sms, it is easy for identifying our msg.
on receiving a msg we will get +cmg:- +mobile number+etc…
in my code
if(RCIF)
{
c=RCREG;
if(c[0]==’*’)i++;
else i=0;
RCIF=0;
}
the array will increment only when ur msg starts with “*”
msg format:-
*a- appliance 1 ON
*b- appliance 2 ON
*c- appliance 3 ON
*d- appliance 4 ON
*e- appliance 1 OFF
*f- appliance 2 OFF
*g- appliance 3 OFF
*h- appliance 4 OFF
Lcd8_Display(0xC0,”APPLIANCE 1 ON “,16);
please check that function… u can understand it easily.
In that function, i’m sending 16 character string to LCD display. strating location 0xC0