Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8051 assembly codes for send&recieve AT_commands by microcontroller&mobile

Status
Not open for further replies.

ritchie

New Member
hi
i 'm working on a project to control a few relays with a mobile sms , i want to interface a mobile sms to a 8051 micro , i need help about sending at_commands by micro to mobile in 8051 assembly codes,

thanks a lot
 
Hi my dear friend& thanks for your answer, but i want to know how can i send for example : AT+CMGR=1 from micro to mobile , what 's the assembly codes for sending this command to mobile

thanks a lot
 
I can supply the code in C if you require. Why asm?

Make a call that sends what in the Acc to the serial port
Code the command in prg memory and terminate in zero.
Repeat the send command from the first position until zero is detected and send ASCII 13 (carriage return) instead.

In C / pseudo code

char output[10]; //make an array to handle the length of what you want send.
sprintf(&output,"AT+CMGR=1"); //put the command into the array
while (output!=0) // send until NULL (0) is encountered
{
send output'
}
send (13); // send carriage return (your return key on the keyboard)

You may then want to check the modem returns "OK" in line with the AT command spec for your modem.

This can be complex as each modem differs and you need to handle exception to how the modem replies
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top