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.

read and send sms using AT89S52

Status
Not open for further replies.

9780id

Junior Member level 1
Joined
May 8, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,386
dear friend,i'm making a project called power on/off system using sms.
the idea is when i send LAMP ON the lamp that attached through relay and 89S52 will turned on and also the phone will send the feedback LAMP IS ON. in my project i'm not using any LCD.
The mobile I used is siemens C55 with PDU mode.I already understand how to read and send sms between PC and mobile.But when it comes to microcontroller i confused.
I now confused how to read and send sms through microcontroller.does anybody mind to give me explanation?my dateline is on sunday :(
please help.

regards
 

Hello
You have to purchase GSM Module which is available in market.Like Sim300 or Sim 900 etc.
You will have RX and TX pin in it . you will get set of AT commands to communicate with GSM module.
Which micro controller are you choosing?? 1314733261_210935927_1-Sim-300-GSM-Mysore-Mangalore.jpg
 

i finished with the hardware,just i dont understand to program for send and read sms.
I am using siemens C55 with PDU mode and microcontroller AT89S52.
can you give me the example using C?
thank you aameer
 

i have read that many times before but still didnt get it..
do you mind to explain it?
thanks
 

post the code part which you are not getting...
 

hi aameer,here is the code which i confused
Code:
void transmit_data(unsigned char str)		// Function to transmit data through serial port
{
	SBUF=str;		                // Store data in sbuf
	while(TI==0);	                        // Wait till data transmit
	TI=0;			  
}

void receive_data()  interrupt 4	 // Function to recieve data serialy from RS232 into microcontroller
 {
	 str=SBUF;                       // Read sbuf
	 RI=0;
	 transmit_data(str);             // Transmit to HyperTerminal
 }
i dont get it what data is there.
The thing is,i want to try for example I send LAMP ON to the system,and it will reply back LAMP IS ON.
do you mind to give the example code for that?
I am using siemens C55 in PDU and microcontroller AT89S52
thank you
 

initially send
Code:
First check by sending AT 
transmit_data('A');
transmit_data('T');
transmit_data(13);

In receiving part you change like below
unsigned char buffer[60];
unsigned char count;

void receive_data()  interrupt 4	 // Function to recieve data serialy from RS232 into microcontroller
 {
	 buffer[++count]=SBUF;                       // Read sbuf
	 RI=0;
 }

Then wait until it receives any feedback from GSM Module
while(count>0);
delay_ms(500);
for(i=0;i<count;i++)
{
    j=i;
   if((buffer[j]=='O')&&(buffer[++j]=='K')
   {
      LCD_data('1');
      delay_ms(300);
  }
 

dear aameer, i tried above code and it didn't work :(
maybe I have mistakes in interfacing the Siemens C55 with the AT89S52?
I will upload my schematic, please help me examine it.
Thanks
 

Does the Siemens C55 module has max232 or it is giving TTL output.
If it is giving TTL output you can directly connect RX--> TX of micro controller and TX--> RX of micro controller.
IF it is having max232 then you should connect DB9 connector with rs232 wire with cross connection with GSM module and your max232 board and from thiismax232 it will TTL output. connect as mentioned above to micro controller

- - - Updated - - -

Does the Siemens C55 module has max232 or it is giving TTL output.
If it is giving TTL output you can directly connect RX--> TX of micro controller and TX--> RX of micro controller.
IF it is having max232 then you should connect DB9 connector with rs232 wire with cross connection with GSM module and your max232 board and from thiismax232 it will TTL output. connect as mentioned above to micro controller
 

hi ammeer, here is my connection between C55 and the microcontroller
C55 Circuit.JPG
I think It need Max232 since I have to connect to the PC for test the AT command.
I may not use any LCD :(
 

please help somebody,the dateline is tomorrow :(((((
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top