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.
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??
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
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
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
I think It need Max232 since I have to connect to the PC for test the AT command.
I may not use any LCD