Projects › Projects › vehicle tracking system using gsm and gps module › hello guys i am facing a
April 1, 2012 at 7:17 am
#7375
Participant
hello guys i am facing a problem in sending sms…..
my developed code is here…plz check it out..
thanxx in advance…!!!!
#include<reg52.h>
#define lcd_data P2
#define lcd_cont() ((lcd_en=1),(delay(3)),(lcd_en=0))
void UART_init();
void send_to_modem(char*);
void enter();
void send(char);
void ch_send_to_modem(char*);
void lcd_init(void);
void lcdcmd(unsigned char value);
void lcddata(unsigned char value);
void msgdisplay(unsigned char b[]);
void delay(unsigned int value);
void send_to_modem(char*);
void enter();
void send(char);
void ch_send_to_modem(char*);
unsigned char str[10],mobilenum[11]={“09887081656”};
unsigned char mobilenum1[10];
code unsigned char str1[]={“OK”};
unsigned char l,s,n,a,b,i,count,j,jjj,hb=68;
sbit temp=P1^3;
sbit lcd_rs = P1^0;
sbit lcd_en = P1^2;
void main()
{
temp=1;
lcd_init();
UART_init();
lcdcmd(0x84);
msgdisplay(” welcome ” );
delay(1000);
lcdcmd(0x01);
msgdisplay(“searching for”);
lcdcmd(0xc0);
msgdisplay(“GSM modem”);
delay(100);
send_to_modem(“ate0”); //to avoid echo signals,
enter();
send_to_modem(“at”);
enter(); // TO CHECKING GSM MODEM…
send_to_modem(“at”);
enter();
send_to_modem(“at”);
enter();
send_to_modem(“at”);
enter();
send_to_modem(“atr”);
enter();
for(mobilenum=0;mobilenum<11;i++);
for(s=0;s<5;s++) // Here we are waiting for data whitch is sending by GSM modem
{ // to checking wether the GSM modem connected to system or
while(RI==0); // not.
str=SBUF;
RI=0;
}
/* str=’