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 / Problem in interfacing with pic16f877a and gsm (SIM900A)

Problem in interfacing with pic16f877a and gsm (SIM900A)

|

Microcontroller › PIC › Problem in interfacing with pic16f877a and gsm (SIM900A)

  • This topic has 5 replies, 4 voices, and was last updated 9 years, 5 months ago by Shabuj.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • March 18, 2014 at 2:59 pm #4866
    pradeep
    Participant

    1) putty testing to gsm module working fine

    our image is shown below:

     

    2) plz check this program if any mistake is there or not……

     

    OUR PROGRAM:

     

    #include<pic.h>
    #include<string.h>
    __CONFIG( HS & WDTDIS & BOREN & LVPDIS );
    unsigned char str1[4]=”ATn”;
    unsigned char str3[10]=”AT+CPIN?n”;
    unsigned char str4[16]=”ATD7418211136;n”;
     
     
    void delay(unsigned int y)//delay prg
    {
    while(y–);
    }
    void pra()
    {
    delay(5000);
    delay(100);
    delay(5000);
    delay(100);
     
    delay(5000);
    delay(100);
    }
     
    int a,b,c,d,e,i;
    void main()
    {
     
    TRISC=0X80;
    TXSTA=0X26;
    RCSTA=0X80;
    SPBRG=25;
     
    while(1)
    {
    TRISB=0X01;
    PORTB=0X36;
     
    delay(1000);
     
     
    for (a=0;a<=3;a++)
    {
    if(TRMT==1)
    {
    TRMT=0;
    TXREG=str1[a];
    delay(1000);
    }
    }
    delay(5000);
     
     
    for (c=0;c<=9;c++)
    {
    if(TRMT==1)
    {
    TRMT=0;
    TXREG=str3[c];
    delay(1000);
    }
    }
    delay(5000);
     
     
    for (d=0;d<=15;d++)
    {
    if(TRMT==1)
    {
    TRMT=0;
    TXREG=str4[d];
    delay(1000);
    }
    }
    delay(5000);
     
    delay(5000);
     
    delay(5000);
     
     
    while (1);
     
    }
    }
     
     
    3) our UART output viewed in putty software, shown below
     
     
    4) our connection diagram:-
     
     
    we have tried to change all sorts connection between tx and rx.. we have no any more futher ideas to proceed… plz help us out… check our program or other circiut mistakes if we have done…. plz correct and reply to our doubts… and if possible mail us the correct coding and connection diagram… mail id: [email protected]
    plz help us we are beginners…
    March 18, 2014 at 4:59 pm #11326
    Ganesh Selvaraj
    Participant

    the problem is with your program.

    unsigned char str1[4]=”ATn”;
    unsigned char str3[10]=”AT+CPIN?n”;
    unsigned char str4[16]=”ATD7418211136;n”;
     
    You need to use ‘r’ and not ‘n’ . so change that part to
     
    unsigned char str1[4]=”ATr”;
    unsigned char str3[10]=”AT+CPIN?r”;
    unsigned char str4[16]=”ATD7418211136r”;

     

    March 19, 2014 at 5:12 pm #11342
    pradeep
    Participant

    r does nt wrk.
    Now it wrkd fine i used both n end of each liner nd n nd increased te delay
    thanks :)

    March 20, 2014 at 2:37 pm #11344
    Ganesh Selvaraj
    Participant

    oh fine. And you are welcome. If you have any more queries do post them here.

    March 24, 2014 at 9:24 am #11371
    erwin
    Participant

    :)

    January 30, 2016 at 5:02 pm #13671
    Shabuj
    Participant

    I need a microc code for voice call by sim900A using push button. When i press button for 2 sec then i get a phone call in my hand set
    Please help me

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

RSS Recent Posts

  • Simple LED Analog Clock Idea July 7, 2025
  • The Analog Gods Hate Me July 7, 2025
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz July 7, 2025
  • PIC KIT 3 not able to program dsPIC July 7, 2025
  • Parts required for a personal project July 6, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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