Extracting response from TC35i GSM using PIC16f690

General discussion on mikroC.
Post Reply
Author
Message
White Coral
Posts: 1
Joined: 04 May 2011 15:07

Extracting response from TC35i GSM using PIC16f690

#1 Post by White Coral » 04 May 2011 15:15

Hi all,

I am now trying to extract the response from TC35i GSM using pic16f690. When I send "AT" to GSM, the GSM suppose to give me an "OK" response. However, the PIC16f690 cannot receive the response properly. I actually use MAX232 to connect GSM with PIC and I use another MAX232 to connect PIC with Hyperterminal. From Hyperterminal I can see the received response from the GSM. From the result, I know that instead of receiving only an "OK", the PIC will also receive the echo of "AT". Below is my code,

Code: Select all

for(j=0; j<2; j++)
{
     TXREG=C[j];                    // Sending "AT"
     for(i=0; i<500; i++)         // Delay
     {
     }
}

TXREG = 0x0D;                    // Sending "Enter"

if (RCREG=='T')                    // If receive "T"
{
     PORTC = 0x01;               // LED will turn on
}
Even if i try with RCREG=='O' or RCREG=='K', the LED will not turn on. How to make PIC16f690 be able to read the response from GSM correctly?

I need your help earnestly. I will truly appreciate any help from you guys. Thank you so much.

Post Reply

Return to “mikroC General”