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.

Pic sending SMS to GSM Module

Status
Not open for further replies.

Morebles

Newbie level 4
Joined
Oct 12, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Zambia
Activity points
1,313
I m doing a telemetry project where i want to use a pic16f877 to send sms to a GSM module.I dont know a suitable and simple module to use.The module should also send the time the message is send as phones do.Can anyone please help me with the source code to program the pic.I would mostly prefer assembly language.The project is due very soon please help me
 

i use pic18f252 to send sms with sim 508, i use MicroC Pro, hopefully help your project:
//===================================================== send sms
void Send_sms()
{
unsigned char sms_send_ok;
RCSTA.CREN=1;
putst_sim548("AT+CMGF=1"); //send sms with text mode
Delay_ms(50);

putst_sim548("AT+CSCS=\"GSM\""); //text mode = GSM alphabet
Delay_ms(50);

putst_sim548("AT+CMGD=1"); //clear sms in sim store
Delay_ms(50);

SendString_NoCR("AT+CMGS=\""); //type phone number send data withuot CR
SendString_NoCR(str_number); //your phone number
SendString_NoCR("\"");
putch_232(0x0D);

if (sim548_buf[0]==0x0A);SendString_NoCR_WithLengh(tx_buf,TX_SIZE); //send data without CR and the lengh is determined
putch_232(0x1A); //ctrl+Z
//putch_232(0x1B); //ESC

Delay_ms(50);
}
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top