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 / pic 16f913 with gsm modem

pic 16f913 with gsm modem

|

Microcontroller › PIC › pic 16f913 with gsm modem

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 11 months ago by AJISH ALFRED.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • June 27, 2013 at 11:42 am #2508
    Arun Sukumaran
    Participant

    hi all,

    when i am compiling my code it showing the followig erors….

    #include<pic.h>
     
    void tx_data(unsigned char);
    void gsm_cmd(unsigned char *);
    void power_ON();
    void delay1(char);
    int check_ok( char *data);
     
     
    int i,j=0,ok;
    unsigned char *at_cmd=”AT”;
     
    unsigned char *call_cmd=”ATD8892279904;”;   
     
    unsigned char enter=0x0D;
     
    unsigned char value=0;
    unsigned char const *data;
     
    void main()
    {
    TRISB=0x00;
    PORTB=0x00;
    TRISC=0x00;
    PORTC=0x00;
    LCDCON=0X00;
     
    SPBRG=0X19;
    TXSTA=0X24;
    RCSTA=0X90;
    PIE1=0X20;
    INTCON=0XC0;
     
     
    power_ON();
     
    gsm_cmd(at_cmd);
    do
    {
    ok=check_ok(*data);
    }
    while(!ok);
              
    gsm_cmd(call_cmd);
    gsm_cmd(enter);
     
    }
     
    void power_ON()
    {
    RB2=0;
    RB1=0;
    RB1=1;
    delay(30);
    //RB1=0;
    }
    /*int led()
    {
    RC0=1;
    RC6=1;
    delay1(100);
    RC0=0;
    RC6=0;
    delay1(100);
    return 0;
     
    }
    void led2()
    {
    RC0=0;
    //delay(1000);
    //RC0=1;
    }*/
    void gsm_cmd(unsigned char *string)
    {
    i=0;
    while(string!=’’)
    {
     
    tx_data(string);
    i++;
     
    }
     
    tx_data(enter);
     
    }
     
     
     
    void tx_data(unsigned char serial_data)
    {
    TXREG=serial_data;
    while(!TXIF);
    TXIF=0;
    }
     
    int check_ok(char *data)
    {
    unsigned char *chk_ok=”OK”;
    int result;
    result= strcmp(data,chk_ok);
    return result;
      
    }
    void interrupt()
    {
    data[j]=RCREG;
    j++;
    }
     
    void delay1(char n)
    {
     
    for(j=0;j<n;j++)
    for(i=0;i<1000;i++);
     
    }
     
     
     
     
     
    the errors are**********
    **********
    Build C:UsersthintureDocumentsarunfinaltest for device 16F913
    Using driver C:Program Files (x86)HI-TECH SoftwarePICC9.83binpicc.exe
     
    Make: The target “C:UsersthintureDocumentsarunfinalgsm_call.p1” is out of date.
    Executing: “C:Program Files (x86)HI-TECH SoftwarePICC9.83binpicc.exe” –pass1 C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c -q –chip=16F913 -P –runtime=default –opt=default -D__DEBUG=1 -g –asmlist “–errformat=Error   [%n] %f; %l.%c %s” “–msgformat=Advisory[%n] %s” “–warnformat=Warning [%n] %f; %l.%c %s” 
    Warning [359] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 11.27 illegal conversion between pointer types
    pointer to const unsigned char -> pointer to unsigned char
    Warning [359] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 13.41 illegal conversion between pointer types
    pointer to const unsigned char -> pointer to unsigned char
    Warning [357] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 40.18 illegal conversion of integer to pointer
    Warning [357] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 45.14 illegal conversion of integer to pointer
    Warning [361] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 54.1 function declared implicit int
    Warning [359] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 100.27 illegal conversion between pointer types
    pointer to const unsigned char -> pointer to unsigned char
    Warning [361] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 102.9 function declared implicit int
    Error   [285] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 107.1 no identifier in declaration
    Error   [314] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 107.1 “;” expected
    Warning [374] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 109.2 missing basic type; int assumed
    Error   [984] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 109.2 type redeclared
    Error   [1098] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 109.2 conflicting declarations for variable “j” (C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c:10)
    Error   [314] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 109.2 “;” expected
    Error   [285] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 110.1 no identifier in declaration
    Warning [374] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 110.1 missing basic type; int assumed
    Error   [314] C:UsersthintureDocumentsarunMPLAB16f913PIC16F913gsm_call.c; 110.1 “;” expected
     
    ********** Build failed! **********
    help me…..
    July 4, 2013 at 5:01 am #10092
    AJISH ALFRED
    Participant

    Hi Arun,

    The error dialogue has got line number where the error occured. Please help us to find those lines in your code. You can mark them as bold in the code which you’ve posted.

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

RSS Recent Posts

  • using a RTC in SF basic June 21, 2025
  • Can I make two inputs from one?? June 21, 2025
  • 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

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