EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / gsm interfacing with 8051

gsm interfacing with 8051

|

Microcontroller › 8051 › gsm interfacing with 8051

  • This topic has 2 replies, 2 voices, and was last updated 12 years ago by tejashree.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 2, 2014 at 8:44 am #3011
    tejashree
    Participant

    i have problem while recieving sm sfrom gsm moedm icant display sms in text mode on lcd it recievs sms but cant display on lcd pls help me 

    #include<reg51.h>
    #include<stdio.h>
    sbit rs = P3^2;
    sbit rw = P3^3;
    sbit en = P3^4;
     char a;
    int count=0,i,j=0,k=0;   
    void delay(unsigned int msec)        // Function for delay
    {   
     int i,j ;    
        for(i=0;i<msec;i++) ;   
           for(j=0; j<1275; j++);
           }
          
    void lcd_cmd(unsigned char item)            // Function to send command on LCD
    {    
        P1= item;    
        rs= 0;
        rw=0;
        en=1;
        delay(1);
        en=0;    
        }
     
     void lcd_data(unsigned char item)            // Function to display character on LCD
     {
         P1= item;    
        rs= 1;    
        rw=0;
        en=1;    
        delay(1);    
        en=0;    
        }    
     
    void lcd_data_string(unsigned char *str)                  // Function to display string on LCD
     {    
         int i=0;    
        while(str!=’’)    
        {    
              lcd_data(str);
              i++;
              delay(10);                    
          }    
      
     }   
    void lcd()
    {
         lcd_cmd(0x38);                    // For using 8-bit 2 row LCD     
         delay(5);  
    lcd_cmd(0x01);                    // For using 8-bit 2 row LCD     
         delay(5);                          
         lcd_cmd(0x0F);                    // For display on, cursor blinking
         delay(5);
    lcd_cmd(0x0E);                    // For using 8-bit 2 row LCD     
         delay(5); 
         lcd_cmd(0x80);                    // Set the cursor on first position of lcd
         delay(5);                        
     }
    void main()
     {
     char j;
    unsigned char i;
     lcd();
    TMOD=0X20;
    TH1=0XFD;
    SCON=0X50;
    TR1=1;
    RI=0;
    TI=1;
     lcd();        
    lcd_data_string(“recieving msz “);
    printf(“AT+CMGF=1%c”,13);
     delay(50);
    printf(“AT+CMGR=1%c”,13);
    delay(50); 
     printf(“%c”,0x1A);
     lcd_cmd(0xc0);
    //printf(“AT”);
      TI=0;
     for(i=0;i<2;i++)
     lcd_data(j);
     while(1)
     {
     TR1=1;
    while(RI==0);
     a=SBUF;
     //b=’a’;
    // lcd_data(‘b’);
     RI=0;
     TR1=0;
    // while(1);
     
      }                   
    }
    this is my code but its not working

     

    April 2, 2014 at 9:06 am #11443
    Ashutosh Bhatt
    Participant

    in ur program i am not seeing any receive function. u r receiving in main function in single variable ‘a’

    how complete message can be stored in a?

    also in your program you are not displaying a.

    April 2, 2014 at 9:24 am #11447
    tejashree
    Participant

    if i write lcd_data(‘a’);

    then hw i solve this problem

     

     

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Getting into an LED bulb April 21, 2026
  • understanding of resonance in time domain April 21, 2026
  • Beginner Questions About CNC Machines – G-code, Control Systems & Accuracy April 21, 2026
  • A Must-Watch Video Showing Dangerous Construction of Cheap Lithium-Ion Cells April 21, 2026
  • S1MJ ? April 20, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise