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.

Receiveing SMS

Status
Not open for further replies.

neelam29

New Member
Hi guys,
i'm trying to learn gsm modem communicatin with microcontroller(pic16f877). in 'C' laguage.

I'm able to send sms but cannot receive any message. I'm trying to display 1st two characters of a SMS on location 1 using the code below.....but the code isn't working.(in hyperterminal the same command "AT+CMGR=1" shows the message)

Code:
printf("AT+CMGR=1");
putch(0x0D);
putch(0);
DelayMs(200);

sms[0]=getch();
sms[1]=getch();

lcd_clear();
lcd_goto(0x80);
lcd_puts(sms);



i'm using standard AT+CMGS command with printf for sending sms which is working properly. One thing more, i think there shouldn't be any problem with my hardware , cause when i do this communication between uC & Hyperterminal, Hyperterminal shows "AT+CMGR=1" and then if i press any 2 keys on keyboard the same are shown on LCD.

Please help me out.

With best regards,
Neelam
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top