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 / Interfacing PIC 16f877a with SIM900D

Interfacing PIC 16f877a with SIM900D

|

Microcontroller › PIC › Interfacing PIC 16f877a with SIM900D

  • This topic has 23 replies, 5 voices, and was last updated 8 years, 7 months ago by arjun.
Viewing 15 posts - 1 through 15 (of 24 total)
1 2 →
  • Author
    Posts
  • May 6, 2012 at 9:47 am #1787
    Humad Ahmed
    Participant

    I am currently doing a project on PIC 16f877a with SIM900D GSM MODULE. The purpose of this GSM MODULE is to send an SMS to a number and then wait for response. Based on the response, it would call functions from the PIC 16f877a. I need immediate help in writing the code in C to generate a menu and send it to a mobile number.I am currently using MPLAB IDE 8.80… 

    May 10, 2012 at 5:35 am #7698
    Amrith
    Participant

    Hi Ahmed,

     

    Good Project, if you could do coding on your own you can learn much more, suggest you to start from your side i will support you to complete your project.

     

    Learn below topics to start coding:

     

    Basic AT commands for SMS.

    Serial Communication(UART) through microcontroller.

     

    All the Best !!!

    May 10, 2012 at 5:35 am #7717
    Amrith
    Participant

    Hi Ahmed,

     

    Good Project, if you could do coding on your own you can learn much more, suggest you to start from your side i will support you to complete your project.

     

    Learn below topics to start coding:

     

    Basic AT commands for SMS.

    Serial Communication(UART) through microcontroller.

     

    All the Best !!!

    May 10, 2012 at 1:18 pm #7706
    Humad Ahmed
    Participant

     

    Well, This is the code i have come up with, but the problem is that the AT Commands keep on looping when i run simulation in Proteus…
     
    #include<pic.h>
     
    char gsmat1[3]=”ATr”;
    char gsmat2[10]=”AT+CMGF=1r”;
    char gsmat3[22]=”AT+CMGS=”03219396419″r”;
    char gsmat4=26;
     
    void SerialInit()
    {
    TRISC6=0;
    TRISC7=1; 
    TX9=0;
    SPBRG=64;
    BRGH=1;
    SYNC=0;
    SPEN=1;      
    TXEN=1;
    RX9=0;
    CREN=1;
    }
     
    void delay(unsigned long y)
    {
    int i=0;
    for(i;i<y;i++);
    }
     
    void SerialTX(unsigned char c)
    {
    while(TXIF==0);
    TXREG=c;
     
    }
     
    void send(unsigned char *s)
    {
    int i=0;
    while(s!=’’)
    {
    while(TXIF==0);
    TXREG=s;
    i=i++;
    delay(15000);
    }
    delay(15000);
    }
     
    void main (void)
    {
    SerialInit();
    delay(15000);
    while(!TXIF);
    send(gsmat1);
    delay(15000);
    TXREG==0;
    TXEN==0;
    }
    May 10, 2012 at 1:18 pm #7725
    Humad Ahmed
    Participant

     

    Well, This is the code i have come up with, but the problem is that the AT Commands keep on looping when i run simulation in Proteus…
     
    #include<pic.h>
     
    char gsmat1[3]=”ATr”;
    char gsmat2[10]=”AT+CMGF=1r”;
    char gsmat3[22]=”AT+CMGS=”03219396419″r”;
    char gsmat4=26;
     
    void SerialInit()
    {
    TRISC6=0;
    TRISC7=1; 
    TX9=0;
    SPBRG=64;
    BRGH=1;
    SYNC=0;
    SPEN=1;      
    TXEN=1;
    RX9=0;
    CREN=1;
    }
     
    void delay(unsigned long y)
    {
    int i=0;
    for(i;i<y;i++);
    }
     
    void SerialTX(unsigned char c)
    {
    while(TXIF==0);
    TXREG=c;
     
    }
     
    void send(unsigned char *s)
    {
    int i=0;
    while(s!=’’)
    {
    while(TXIF==0);
    TXREG=s;
    i=i++;
    delay(15000);
    }
    delay(15000);
    }
     
    void main (void)
    {
    SerialInit();
    delay(15000);
    while(!TXIF);
    send(gsmat1);
    delay(15000);
    TXREG==0;
    TXEN==0;
    }
    May 11, 2012 at 5:26 am #7741
    srikanth
    Participant

    Hi Amrith,

     

         Could you tell me the best way to learn CCS coding ..

    May 11, 2012 at 5:26 am #7720
    srikanth
    Participant

    Hi Amrith,

     

         Could you tell me the best way to learn CCS coding ..

    May 11, 2012 at 5:40 am #7724
    Amrith
    Participant

    Hi Ahmed..

     

    Good. Will get back to you with a solution in short time.

    May 11, 2012 at 5:40 am #7745
    Amrith
    Participant

    Hi Ahmed..

     

    Good. Will get back to you with a solution in short time.

    May 11, 2012 at 5:43 am #7726
    Amrith
    Participant

    Hi Srikanth,

     

    Suggest you to visit Texas Instrument web site, they provide you online training with videos. Also you will find much more stuff on CCS.

    May 11, 2012 at 5:43 am #7747
    Amrith
    Participant

    Hi Srikanth,

     

    Suggest you to visit Texas Instrument web site, they provide you online training with videos. Also you will find much more stuff on CCS.

    May 11, 2012 at 5:58 am #7750
    srikanth
    Participant

      

     

       Amrit ,

     

               I mean CCS C compiler programming for PIC microcontrollers..

    May 11, 2012 at 5:58 am #7730
    srikanth
    Participant

      

     

       Amrit ,

     

               I mean CCS C compiler programming for PIC microcontrollers..

    May 11, 2012 at 6:38 am #7733
    Amrith
    Participant

    Srikanth,

     

    I thought that you were asking about CCS(Code Composer Studio IDE), Very familiar IDE used on multiple platforms.

     

    For CCS C compiler (Custom Computer Service), you can vist ccsinfo.com, there you can find example progrms for different PIC controllers & tutorials for beginners, if you are a beginner start writing basic code using port pins to blink LED e.t.c

    May 11, 2012 at 6:38 am #7754
    Amrith
    Participant

    Srikanth,

     

    I thought that you were asking about CCS(Code Composer Studio IDE), Very familiar IDE used on multiple platforms.

     

    For CCS C compiler (Custom Computer Service), you can vist ccsinfo.com, there you can find example progrms for different PIC controllers & tutorials for beginners, if you are a beginner start writing basic code using port pins to blink LED e.t.c

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

RSS Recent Posts

  • Help with finding unique wire lug(s) June 21, 2025
  • Simple LED Analog Clock Idea June 21, 2025
  • Kawai KDP 80 Electronic Piano Dead June 21, 2025
  • Saga 1400sv vinyl cutter motherboard issue June 21, 2025
  • using a RTC in SF basic June 20, 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