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

Humad Ahmed

  • Profile
  • Topics Started
  • Replies Created
  • Engagements

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 10, 2012 at 1:18 pm in reply to: Interfacing PIC 16f877a with SIM900D #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 in reply to: Interfacing PIC 16f877a with SIM900D #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 6, 2012 at 9:38 am in reply to: GSM INTERFACE WITH PIC #7598
    Humad Ahmed
    Participant

    Currently, I am doing the exact same thing… Can you please send me your sample code, it will be really helpful. I have written some code but the AT Commands keep on looping…

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)

RSS Recent Posts

  • CR2/CR123A Batteries In Projects February 9, 2026
  • Variable audio oscillator February 8, 2026
  • Do i need a buffer? February 8, 2026
  • ANOTHER OLD PROJECT REDO February 7, 2026
  • wall transformer polarity February 7, 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