GSM pgm

Thread Starter

ratheeshbr

Joined Mar 8, 2010
3
Hi
I am trying to interface GSM modem with 16f877a microcontroller using ccs c compiler. I am trying recieve serial data. But unfortunately my controller is not recieving the data if more than three bits are arrivedat the same time. After that I have to reset the controller to recieve data again. Please help me to clear this problem
 

thatoneguy

Joined Feb 19, 2009
6,359
3 bits or 3 bytes?

Are you using the onboard UART on the PIC and answering every interrupt, then resetting the interrupt flags?
 

Thread Starter

ratheeshbr

Joined Mar 8, 2010
3
#include<16f877a.h>
#include"pic1.h"
#include"lcd.h"
char ch;
void main()
{
lcdinit();
rc3=0;
printf("AT\n\r");
while(1)
{
ch=getch();
printc(ch);
delay_ms(200);
}
}
 

thatoneguy

Joined Feb 19, 2009
6,359
That code is incomplete, and if you are delaying 200mS between each poll of the port, it won't work.

Why the delay? and what is your getch() function? What pins are the external serial connected to, are you using the onboard UART?

Which C language are you using?
 
Top