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.

sending sms via GSM modem interfaced with PIC16F877

Status
Not open for further replies.

ATcom

Newbie level 5
Newbie level 5
Joined
Oct 2, 2009
Messages
8
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,395
Up to this moment i have studied most of the AT commands, commands like AT+CPIN = " pin#", AT+CMGF = 0 for setting PDU mode. I have also studied some basics of C programming.

My main problem is to write a code to sent these AT commands via the RS323 cable. can anyone help plizz, i realy need your help
 

try the hyperterminal, i think you write there AT command you want then its out from the serial port as you set the hyperterminal settings in the beginning.
 
  • Like
Reactions: kie256

    kie256

    Points: 2
    Helpful Answer Positive Rating
Well i can't use hyperterminal because i have to write an sms to the GSM modem which is interfaced with the PIC16F877.
that is why i am seeking helping with the C code of programming AT commands just to get started. So i am in desparate need of code. Plizz i need your help
 
  • Like
Reactions: tuli

    tuli

    Points: 2
    Helpful Answer Positive Rating
Hi,
I want to send and read SMS using PIC and I want to use AT commands. Although I found lot of details of AT commands I confuse to use them with PIC.
I am going to use MikroC for PIC programming.
By simple code example can any one explain me?
 

Hi,all
i am working on a project of alarrm via GSM
I want to send SMS using PIC 16F877 and I want to use AT commands. Although I found lot of details of AT commands I didn't assimilate the the things very well.
I am going to use MikroC for PIC programming.
By simple code example can any one explain me as soon as possible please?
 

we have the same problem.. could you please help me if in case you already have the codes using microC.. thanx.. :)
 

Hi,

Write the array with AT commands.. for example:
const char atc1[] = "ATE0"; // disable command echo
const char atc2[] = "AT+CFUN=1"; // set full functionality
const char atc3[] = "ATD123456789;"; // place a call to phone number 123456789
// instead of 123456789 insert your phone number
const char atc4[] = "ATH"; // hang up
const char atc5[] = "ATA"; // answer a call
const char atc6[] = "AT+CHFA=0"; // swap audio chanels - use normal audio channel
const char atc7[] = "AT+ECHO=16384,16384,16384,1"; // set echo cancelation parameters
const char atc8[] = "AT+CMIC=0,15"; // set main mic gain to max

Send it UART port in PIC, then get the response

Thanks,
Sivaprakash.R
+91- 99403 28709
 

It is very simple:
1. You need to bring the modem in text mode with:
AT+CMGF=1
2. Send the message:
AT+CMGS="923385255782" <ENTER>
my message here <CTRL+Z>

Aftab,
 
Last edited by a moderator:

Hello,
As "aftab_s81" said you need to send the above command serially, but before that you must check your modem is in work.
For that connect it to COMP Port of your PC and follow the commands below
set COMP Ports baud rate as that of your modem...

1. write ATZ followed by Enter
Modem should respond OK
Delay 2-4 sec

2. AT+CMGF=1 <Enter>
modem again must say OK
Delay 2 sec

3. AT+CMGS="+919762123456" <Enter>
Modem will send ">"
Now put you message followed by<CTRL+Z>
Delay 2 sec

now modem will send the message status i.e. message sent or not (error)...

On controller side write above command and first check on Hyper Terminal...

If both are working problem solved :)
 

This thread starts 2009. Maybe thread starter have done the project.
 

this is easy if you are using hyperterminal.the problem is how you convert this command to a programming language such as C language to send AT commands using microcontroller to gsm modem
 

this is easy if you are using hyperterminal.the problem is how you convert this command to a programming language such as C language to send AT commands using microcontroller to gsm modem

Hello here is the code for sending an sms with the pic it work i test it and i am still working on it.
it work properly when is running alone but when I put it in a routine don't work
i am still working to fix that but the program what i will post it work 100%

void main() {
UART1_Init(9600);
UART1_Write_Text("AT+CMGS=");
UART1_Write(0x22); // to send the "
UART1_Write_Text("<full phone number>"); //00xxxxxxxxxxxxxx
UART1_Write(0x22); // to send the "
UART1_Write(0x0d); // to send <Enter>
DELAY_MS(200);
UART1_Write_Text("hello PIC16F877A");
UART1_Write(26); // to send <Ctr+z>
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top