Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Send And Receive SMS With AVR And SIM300‎

Status
Not open for further replies.
Hi,Dear Friend.
I'm Don't Any Program About This Project.
Plz You Can Help me???????

---------- Post added at 11:01 ---------- Previous post was at 10:46 ----------

Hi,

Plz Help Me?????????
Plz Help Me?????????Plz Help Me?????????
 

/* Header file declaration */
#include<reg51.h>
/* SFR declaration */
sfr lcd=0x90;

/*single bit declaration */
sbit RS=0x90;
sbit EN=0x91;

void delay(unsigned int );

/* modem function decalration */

void uart_init(void);
unsigned char Rx_data(void);
void Tx_data(unsigned char );
void Tx_Str(unsigned char *);
void enter(void);
void gsmcmdsend(unsigned char *);
void gsm_init(void);
void Recv_frm_mob();
void snd2mob();


/* variable declarations */

unsigned char phone[15];
unsigned char pass[2]="Hi";

void main()
{
lcd_init(); //To initalise the lcd
uart_init(); //To initalise the uart
send2mob();



}

void uart_init(void)
{
TMOD=0x20; /* timer 1, 8 bit auto reload */
SCON=0x50; /* set 9600 bps baudrate */
TH1=0xfa; /* serial mod 1, enable reception */
TR1=1; /* timer1 start */
}

void enter(void)
{
SBUF=0x0A;//line feed
while(TI==0);
TI=0;
SBUF=0x0D;//carriage return
while(TI==0);
TI=0;

}


void delay(unsigned int sec)
{
unsigned int i,j;

for(i=0;i<sec;i++)
for(j=0;j<1500;j++);
}


void gsmcmdsend(unsigned char *cmd)
{
unsigned char i;
for(i=0;*cmd!='\0';i++)
{
SBUF=*cmd;
while(TI==0);
TI=0;
cmd++;
}
delay(1);
enter();
}

void gsm_init(void)
{
unsigned char code gsm_cmd1[]="AT";
unsigned char code gsm_cmd2[]="ATE0";
unsigned char code gsm_cmd3[]="AT+CMGF=1";
unsigned char code gsm_cmd4[]="AT+IPR=9600";
unsigned char code gsm_cmd5[]="AT&W";
unsigned char code gsm_cmd6[]="AT+CNMI=2,2,0,0,0";

//checking for AT commands
gsmcmdsend(gsm_cmd1);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response
//removing echo char
gsmcmdsend(gsm_cmd2);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response
//setting the text command
gsmcmdsend(gsm_cmd3);
while(Rx_data()!='O');
while(Rx_data()!='K'); //Waiting for modem response
//setting the Baudrate command
gsmcmdsend(gsm_cmd4);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response
//setting the save to modem EEPROM command
gsmcmdsend(gsm_cmd5);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response
//to enable the sms strchr (buf, 't')
gsmcmdsend(gsm_cmd6);
while(Rx_data()!='O');
while(Rx_data()!='K');//Waiting for modem response

}


void Recv_frm_mob()
{
unsigned char count;
while((Rx_data())!=':');
while((Rx_data())!='+'); //wait till " receive
for(count=0;count<12;count++) // then store 12 digit phone number including
{
phone[count]=Rx_data();
}
phone[count]='\0';
while(Rx_data()!='\n'); //wait till next line
for(count=0;count<2;count++) // store message
{
pass[count]=Rx_data(); //
}
pass[count]='\0'; //Add null char to string to indicate end of string


}


void snd2mob()
{
unsigned char code message[]=" Hello;
Tx_Str("AT+CMGS="); // send cmd to modem
Tx_data('"');
Tx_Str(phone); //send phone no to modem
Tx_data('"');
enter();
while(Rx_data()!='>'); //till waiting for '>' symbol
Tx_Str(message);

Tx_data(0x1A); //eomesg

}


understand this code.....
 
Hi Dear Friend ,
Do You Can Description About Code?
 

there is description for every line.... please look into that.. what description you need???

have you done simple serial comm programs for avr controller?????

if not write a simple program for serial comm and transmit some data to lcd.....
 
Hi My Friend
I don't simple serial comm programs for avr controller?
Can You Send Me Shematic This Project???

---------- Post added at 11:25 ---------- Previous post was at 11:20 ----------

Dear Friend ,
Is It Project For ATMEGA 32 ?

---------- Post added at 11:29 ---------- Previous post was at 11:25 ----------

Where Is My Friend???
 

i am in office and cant spend time with you....download AVR tutorials and do some example programs given in it or see the example in the avr installed directory for serial communication.... i cant be online for more time.....
 

I'm sorry,
When You Is Online??

---------- Post added at 11:41 ---------- Previous post was at 11:37 ----------

Tank You For HelpFul,
But, You Can Design Schematic for This Project??????
Tank You,Tank You,Tank You,Tank You For Your Help?????
 

Hi Dear Friend ,
First ,Tank You For Your Help.....
Can You Write This Project For ATMEGA32 ?
Plz Help Me!
Plz Help Me!
Plz Help Me!
 

Hi, My Firend
Can You Send Me Schematic This project ?????????
Tank You...........

---------- Post added at 06:35 ---------- Previous post was at 05:28 ----------

Hi, Dear Friends.
Please Help Me,Please Help Me,Please Help Me,Please Help Me,
Please Help Me,Please Help Me.........
 
Last edited:

hi, my firend
can you send me schematic this project ?????????
Tank you...........

---------- post added at 06:35 ---------- previous post was at 05:28 ----------

hi, dear friends.
Please help me,please help me,please help me,please help me,
please help me,please help me.........

stop begging and do something.
 

Hi Dear .
Please Help Me In This project?????
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top