[SOLVED] sim900 and pic16f886 (response problem)

Status
Not open for further replies.

baykoyu

Newbie level 3
Joined
Aug 16, 2012
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,299
Hi all,
i've a problem :S
My code;


Code:
    unsigned char buff[6];

        seri_yaz("ATD05545555555\r");

  if(RCIF)
{
       for(i=0;i<6;i++)
{
       buff[i]=seri_al();
}
RCIF=0;
}


  if((buff[2]=='O')&&(buff[3]=='K'))
{
      RA0=1;  // Led is here 
      DelayMs(500);
      RA0=0;
}


i make a voice call with this code but i can't not control response , RA0 pin is not set. :-(
 
Last edited by a moderator:

try like this
Code:
void interrupt()
{
if(RCIF)
{
RCIF=0;
r=seri_al();
if(r=='o')
{
p=1;
}
if(r=='k')
{
q=1;
}
if(p==1&&q==1)
{
RA0=1; // Led is here 
DelayMs(500);
RA0=0;
}
}
}

- - - Updated - - -

also pic porta is analog set it as digital using adcon1 register
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…