Discussion in "Project Addition or Changes" started by    Ramweit    Jul 8, 2017.
Sat Jul 08 2017, 02:12 PM
#1
#include<reg51.h>
#include<stdio.h>
bit moreover,data_bit,sucess,pin,bok,bok1,gprs,gprs9,uma1,flag;
char dat1;
sbit f3locking=P2^7;
sbit f3locking1=P3^4;
sbit WaitFor = P1^4;
unsigned char dataword[48],APN[12],content[22];
unsigned char addresstemp;
unsigned char Pagetemp;

int Page,Number,Number2;
char status;
sfr T2CON=0xc8;
sfr RCAP2H=0xcb;
sfr RCAP2L=0xca;



void hari();
void LoadMessage();
void incrementD();
void GetData11();
void MessageToMob();
void tx0(unsigned char x)
;
#define attempts 3

#include "EepromDriver.c"
#include "RxDTxD.c"
#include "Initialization.c"
#include "summary.c"
#include "gprsdata.c"


main()
{
StartingDelay();
pin=ramdata;
moreover=0;
SCON=0x53;
T2CON=0x34;
RCAP2H=0xff; //ffec
RCAP2L=0xD9;


// RCAP2H=0xff; //ffec
// RCAP2L=0xB2;
moreover=0;

for(Number=1;Number<=32;Number++){WriteDataTo1024(206,Number,0x20); }
ReadDataFrom1024(205,10);
Number2=dat1;
if(Number2>=250 ||Number2<=219){Number2=220;WriteDataTo1024(205,10,220);}
Initiate();
gprs=0;
status=1;
moreover=0;
status=1;
WriteDataTo1024(202,2,0x01);
WriteDataTo1024(202,1,0x01);
WriteDataTo1024(206,1,'0');
WriteDataTo1024(205,1,1);
//ReadDataFrom1024(202,0xab);if(dat1=='1'){Initialise();}


WriteDataTo1024(206,50,'1');
while(1)
{
if(f3locking==0)
{
ModemStatus();
SimInserted();
CheckSignal();
SystemTemp();

incrementD();
moreover=0;
ReadDataFrom1024(245,90);
if(flag==0){
if(dat1=='/'){MessageToMob();}
tx0(0x1A);
flag=1;
}

bok=0;bok1=0;
moreover=0;
ReadDataFrom1024(202,0xab);
if(dat1=='1'){GPRSSend();}

moreover=0;
ReadDataFrom1024(202,0xae);
if(dat1=='1'){SendPC();}

moreover=0;
ReadDataFrom1024(202,0xa1);
if(dat1=='1'){SendGSM();}

moreover=0;
ReadDataFrom1024(202,0xa6);
if(dat1=='1'){LoadMessage();}
StartingDelay();
}
}
}

void tx0(unsigned char x) //send data to serial port 0
{
EA=0;
SBUF=x;
while(TI==0);
TI=0;
EA=1;
}

void LoadMessage()
{
SendReport();
}

void incrementD()
{
moreover=0;
for(Page=1;Page<=100;Page++)
{
Number=1;
ReadDataFrom1024(Page,Number);
if(dat1=='/'){goto outincd;}
Number=125;
ReadDataFrom1024(Page,125);
if(dat1=='/'){goto outincd;}
}
Page=1;Number=1;
WriteDataTo1024(202,221,0x20);
outincd:
moreover=0;
WriteDataTo1024(202,2,Number);
WriteDataTo1024(202,1,Page);
WriteDataTo1024(202,221,'1');
}


void MessageToMob()
{
int i;
char j=2;
ReadDataFrom1024(245,1);
if(dat1!=0x20)
{
printf("AT+CMGS=");putchar('"');printf("+91");
do{gprs=0;}while(f3locking==1);
do{
ReadDataFrom1024(245,j);
if(j>0x0f){goto mout1;}
if(dat1!='*'){putchar(dat1);}
j++;
}while(dat1!='*');
mout1:;
putchar('"');
Enter();
do{
while(RI==0){}
ACC=SBUF;
RI=0;
dat1=ACC; if(dat1=='E'){goto mout2;}
}while(dat1!='>');
GetData11();
Enter();
SendStringOnGSM("WName:");
i=0x90;
do{
ReadDataFrom1024(202,i);
if(dat1!='*'){SendCharOnGSM(dat1);}
i++;
if(i>=0x9b){dat1='*';}
}while(dat1!='*');
Enter();
SendCharOnGSM(0x1a);
WriteDataTo1024(245,1,0x20);
WriteDataTo1024(245,125,0x20);
mout2:;
}
}

void GetData11()
{
int j;
char h=1;
j=90+1;
if(f3locking==0)
{
moreover=0;
selection(h);h++;
do{
ReadDataFrom1024(245,j);

if(dat1=='/')
{
goto cdm;
}
if(dat1!='|')
{SendCharOnGSM(dat1);}
else{SendCharOnGSM(0x0a);SendCharOnGSM(0x0d);selection(h);h++;
}
j++;
}while(dat1!='/');
cdm:; }
}

Mon Jul 10 2017, 06:09 PM
#2
@Ramweit
What is it you want to know ?
Tue Jul 11 2017, 02:37 PM
#3
From this code gsm modem sending SMS to mobiles multiple times to avoid that am trying to give flag for sent SMS, if flag value is 1 have to stop sending SMS repeatedly.....
Tue Jul 11 2017, 04:20 PM
#4
After the SMS is sent the modem should respond
+CMGS: xx
OK

Just wait a few seconds for the reply.
If you get "OK" stop sending.

Of course is the message was not sent the first time
it probably will not be sent at all.


Which modem are you using ?


[ Edited Tue Jul 11 2017, 04:32 PM ]
Thu Jul 13 2017, 06:58 AM
#5
Thank you for response,

Sim300 gsm Modem am using here...

Get Social

Information

Powered by e107 Forum System

Conversation

Wed Nov 08 2017, 01:35 PM
Anirudh jain
I want to burn code in atmel 89s51 24pc 0329 but cannot get the connection with the burner. Can somebody provide me with the circuit diagram for connecting controller to burner. I'm using usb burner
Thu Nov 02 2017, 11:44 AM
karpal
write a program to exchange the content of b register with external RAM address 02CFH help me
Wed Nov 01 2017, 05:47 PM
sanae
i am using the DHT11 but i'm getting some errors in the simulate the programe in proteus 8 professional,: 1)cannot find model file 'DHTXX.MDF'.2)simulation failed due to netlist linker error(s).
Fri Sep 29 2017, 02:45 AM
Maaz
i am doing the same project on verilog please contact me [email protected]
Wed Sep 20 2017, 12:36 AM
Ted
In a missing pulse detector using a 555 timer connected as a monostable vibrator with a PNP transistor,how does the positve input pulse turn on the PNP transistor?
Sun Sep 03 2017, 02:29 PM
martymarty
How do I connect an <NOKIA 1100 LCD > to an atmega328P ?
poojab51296
Sun Aug 20 2017, 10:23 AM
i am intending to interface sd card with STM32F4 and want to write a file in sd card using SPI protocol but using HAL only. Can anyone help me PLEASE!!!!
poojab51296
Sun Aug 20 2017, 10:22 AM
hello
rawat742
Fri Aug 18 2017, 11:37 AM
hi @ angel patel i will attach a file i hope it will be helpfull for you
ExperimenterUK
Mon Aug 14 2017, 09:57 PM
@ angel patel... just log in and post your problem

Downloads

Comments

PANDIKOTESWARARAO
Mon Nov 20 2017, 07:40 PM
Hemantika
Sun Nov 19 2017, 07:34 PM
Wed Nov 15 2017, 10:46 AM
Ansh12
Sat Nov 11 2017, 03:43 AM
AngelGT93
Fri Nov 10 2017, 06:53 AM
JardCrocker
Wed Nov 08 2017, 05:27 PM
vivitern
Tue Nov 07 2017, 09:08 AM
catrons
Sat Nov 04 2017, 10:46 PM

Online

Guests: 46, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37918
Newest member: PANDIKOTESWARARAO
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Nov 20 2017, 10:18 PM
Here is a version of the tutorial that reads a key...
Ansh12 Avatar
Posted By Ansh12
Mon Nov 20 2017, 02:15 AM
As a starting point, can you tell us how much of t...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Nov 19 2017, 08:35 PM
As a starting point, can you tell us how much of t...
Ansh12 Avatar
Posted By Ansh12
Fri Nov 17 2017, 04:07 AM
I am looking keypad interfacing program. I was rea...
JardCrocker Avatar
Posted By JardCrocker
Wed Nov 08 2017, 05:29 PM
Hi...i am a new user here. I was also facing the s...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Nov 07 2017, 07:13 PM
> It employs a fairly advanced technique to detect...
vivitern Avatar
Posted By vivitern
Tue Nov 07 2017, 09:33 AM
I own a used Clavia ddrum4 SE drum module. It empl...
bvdb Avatar
Posted By bvdb
Wed Oct 18 2017, 01:50 AM
I purchased the RKitL51 8051 C compiler from Raiso...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Oct 16 2017, 11:44 PM
That looks complicated.Is 8051_BLK a standard 80...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Oct 15 2017, 07:29 PM
According to this, gmail should support POP3.https...