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.

GSM to Microcontroller interfacing help please.

Status
Not open for further replies.

dijam014

Newbie level 4
Joined
Dec 14, 2010
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,346
Hi everyone, I am new here and I need some help with my project. I currently have a project which I need to interface the GSM module with the microcontroller which is PIC16F877. Im having a hard time figuring out how to use the usart commands specifically the usart_read/usart_read_txt and usart_write/usart_write_txt.

Using mikrobasic and its USART terminal that would act as the GSM module how can I call and use a text format to trigger specific ports of the microcontroller?

Ex. if text = "activate switch 1" then
port A = 0
port B = 1
end if

something like that, thanks.
 

Hai,
No,
Look data sheet for AT commands.
then just use usart_write("AT commands");for diailing - ATD mobile number;
 

**broken link removed**
For example:
ATDXXXXXXXXXXX;
Replace the "X" with your mobile number.

Hope this helps.
 

thanks for the response, but what I need to know is that when I send an SMS to the GSM and it will be sent to the microcontroller, how will i program this using mikrobasic? I just need any idea about this, The SMS that I will send may contain text or numbers? thanks for the help. :)
 

In the controller program, store the incoming data in a array or store it as string. Then read the complete array. use the command AT+CMGR=1,
and after doing this store it in an array.. the array size depends on your requirement.
 
As ckshivaram said, the command "AT+CMGR=1" means that you will read the SMS from location "1".
To receive your message in the controller, you need to know the size of the coming SMS.
The maximum number of characters contained in a single SMS is 160 characters. So, you are expecting a single SMS, then define an array of "Byte" of 160 elements and receive your SMS in this array.

Hope this helps.
 
thanks, i think thats it. Ill try it now and hope it will work :D
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top