Jan 24, 2013 #1 B baykoyu Newbie level 3 Joined Aug 16, 2012 Messages 4 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 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: Jan 25, 2013
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. :-(
Jan 24, 2013 #2 Z zia Full Member level 5 Joined Sep 24, 2010 Messages 284 Helped 27 Reputation 54 Reaction score 26 Trophy points 1,318 Location Islamabad Pakistan Activity points 2,746 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
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
Jan 24, 2013 #3 B baykoyu Newbie level 3 Joined Aug 16, 2012 Messages 4 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,299 @zia thanks problem is solved