<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>gsm interfacing with 8051</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/26676/gsm-interfacing-with-8051</link><description> 
Hi, 
I am interfacing GSM modem with 8051 mc. 
I am able to send message from gsm modem by giving command through
microcontroller. 
but i am not able to read message from gsm modem and cannot display
it on LCD. 
I donot want to use computer in between</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: gsm interfacing with 8051</title><link>https://community.arm.com/thread/104520?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2011 04:23:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ad14ee24-f1db-4477-9b87-d224e1fa3c8f</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Obviously your search was as thorough as your attention to the
instructions on how to post source code:&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.danlhenry.com/caps/keil_code.png"&gt;www.danlhenry.com/.../keil_code.png&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gsm interfacing with 8051</title><link>https://community.arm.com/thread/104517?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2011 03:43:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:93ec5623-ddfc-48a5-830f-3ac96bf8cfc4</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;this is my code:&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
code???&lt;/p&gt;

&lt;p&gt;
code is &lt;b&gt;formatted and commented&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gsm interfacing with 8051</title><link>https://community.arm.com/thread/78949?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2011 03:06:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6a5b0aa7-c7e6-4662-8aa8-541a72cf3426</guid><dc:creator>Sumit Deotarse</dc:creator><description>&lt;p&gt;&lt;p&gt;
i hav searched but i didn&amp;#39;t get even one sample.&lt;br /&gt;
this is my code:&lt;br /&gt;
#include&amp;lt;reg51.h&amp;gt;&lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;string.h&amp;gt;&lt;br /&gt;
void MSdelay(unsigned int);&lt;br /&gt;
void serial_init(void);&lt;br /&gt;
void trans(unsigned char);&lt;br /&gt;
void trans_string(char *);&lt;br /&gt;
void gsm();&lt;br /&gt;
void lcdinit(unsigned char[]);&lt;br /&gt;
void lcddata(unsigned char);&lt;br /&gt;
unsigned int i,j;&lt;br /&gt;
sbit rs = P2^0;&lt;br /&gt;
sbit rw = P2^1;&lt;br /&gt;
sbit en = P2^2;&lt;br /&gt;
unsigned char mydata[]={0x38,0x0E,0x01,0x06};&lt;/p&gt;

&lt;p&gt;
void main()&lt;br /&gt;
{ IE=0X90; P1=0x00; lcdinit(mydata); serial_init(); gsm();
while(1);&lt;br /&gt;
} void serial_init(void)&lt;br /&gt;
{ TMOD=0X20; TH1=0XFD; SCON=0X50; TR1=1;&lt;/p&gt;

&lt;p&gt;
}&lt;br /&gt;
void lcdinit(unsigned char cmd[])&lt;br /&gt;
{ unsigned int i; for(i=0;i&amp;lt;4;i++) { P1=cmd[i]; rs=0; rw=0; en=1;
MSdelay(5); en=0; MSdelay(5); }&lt;br /&gt;
} void lcddata(unsigned char a)&lt;br /&gt;
{ P1=a; rs=1; rw=0; en=1; MSdelay(5); en=0; MSdelay(5);&lt;br /&gt;
} void MSdelay(unsigned int itime)&lt;br /&gt;
{ for(i=0;i&amp;lt;itime;i++) for(j=0;j&amp;lt;1275;j++);&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;
void gsm()&lt;br /&gt;
{ trans_string(&amp;quot;AT\r&amp;quot;); MSdelay(5); trans_string(&amp;quot;AT+CMGF=0&amp;quot;);
trans_string(&amp;quot;\r&amp;quot;); MSdelay(5);&lt;br /&gt;
// trans_string(&amp;quot;AT+CMGS=&amp;quot;&amp;quot;+918983513833&amp;quot;);&lt;br /&gt;
// trans_string(&amp;quot;\r&amp;quot;);&lt;br /&gt;
// MSdelay(5);&lt;br /&gt;
// trans_string(&amp;quot;Santa ne apni car k niche kutte ko leta hua dekha,to
kutte ko ek dum se kheecha or kaha- bahar nikal saale, bada aaya
mechenical engineer banne.&amp;quot;);&lt;br /&gt;
// trans(0x1A); trans_string (&amp;quot;AT+CMGR=1&amp;quot;); trans_string(&amp;quot;\r&amp;quot;);
MSdelay(5);&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;
void trans_string(char *p)&lt;br /&gt;
{ while(*p!=&amp;#39;\0&amp;#39;) { SBUF = *p ; IE=0x00; while (TI==0); TI=0;
IE=0X90; p++; }&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;
void serial0() interrupt 4&lt;br /&gt;
{ unsigned char a; if(TI == 1) { TI=0; } else { a=SBUF; lcddata(a);
RI=0; }&lt;br /&gt;
} /*void trans(unsigned char a)&lt;br /&gt;
{ SBUF=a; IE=0x00; while(TI==0); TI=0; IE=0x90;&lt;br /&gt;
} */&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gsm interfacing with 8051</title><link>https://community.arm.com/thread/66185?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2011 23:57:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5789ea63-0535-4bf6-afe5-621678d28055</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
OK, so you&amp;#39;ve worked out how to use CAPS LOCK properly: &lt;a href="http://www.keil.com/forum/18229"&gt;http://www.keil.com/forum/18229&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Now you need to actually supply some useful information to enable
people to help!&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I am able to send message from gsm modem by giving command
through microcontroller&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
So you must be able to send AT Commands to the modem, and receive
&amp;amp; interpret the response?&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;i am not able to read message from gsm modem&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Why not? What is preventing you?&lt;/p&gt;

&lt;p&gt;
As already noted, that&amp;#39;s like saying, &amp;quot;my car doesn&amp;#39;t work -
what&amp;#39;s wrong with it?&amp;quot;&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;and cannot display it on LCD&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That is an entirely separate issue!&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I donot want to use computer in between&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
What do you mean by that?&lt;/p&gt;

&lt;p&gt;
Note that using a GSM modem - or any other modem - with a
microcontroller is a very common project indeed. There are very many
examples on the web - have you searched...?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gsm interfacing with 8051</title><link>https://community.arm.com/thread/59070?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2011 23:36:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:69de6e0d-f782-41f0-bc83-95753ce9f7db</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;My car is not working - don&amp;#39;t you dare looking under the hood!!!
- help me!&amp;quot;&lt;/p&gt;

&lt;p&gt;
Whining baby!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>