Need help in GSM related coding.

Discussion in 'Programmer's Corner' started by axios, Nov 13, 2011.

  1. axios

    Thread Starter New Member

    Nov 8, 2011
    5
    0
    RI=0;
    Again=10;
    while(Again!=0)
    {
    OACount[4]=0;
    xxx=0;
    printf("ATE0\n"); // Send ATE0 (Disable Echo)
    while(OACount[4] != 2)
    {
    // WDTCN = 0xA5;
    while((RI == 0) && (OACount[4] != 2));
    text[xxx]=SBUF;
    if (text[xxx]==0x0a)
    {
    OACount[4]++;
    }

    RI = 0;
    xxx++;
    }
    xxx--;
    Again=Error_Detect();
    Long_Delay(300);
    //
    }

    I am currently doing a project related to GSM and I have problem running a GSM related program which is done by previous student. I try debugging it and discovered that the pointer run till the "Red coding" and it stuck there... I have check the value of RI and 0ACount[4], both value is 0. But it still not moving to the next part of the program. In other word, i need to run the program to run and exit to the next loop. (I want to state that i do not really understand this program but it has been tested by previous student) Any kind soul and help me on this. Thanks inadvance to those who reply and help.
     
    Last edited: Nov 13, 2011
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,669
    804
    thats the problem, the program will stay forever in the empty while loop.
     
Loading...