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 SIM 300 with PIC 16F877A GSM response data display on LCD problem

GSM SIM 300 with PIC 16F877A GSM response data display on LCD problem

|

Microcontroller › PIC › GSM SIM 300 with PIC 16F877A GSM response data display on LCD problem

  • This topic has 2 replies, 3 voices, and was last updated 12 years, 1 month ago by manimaran.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 26, 2014 at 1:05 pm #2904
    Dhananjaya
    Participant

     

     

    Sir

    I have tested for the following code but it will display only for Carrage return(CR) and Line feed (LF)values  i have checked the ASCII table. GSM SIM response data add with 0x30 so it will display like =: so it will in the ASCII table check thisless than this  values  – 0x30 it will for CR and LF but not display like OK

    please help me… what are the instructions to do this getting like OK . I think it will not given OK from GSM SIM response please check my code and correct it …

     

     

    #ifndef _SERIAL_H_

    #define _SERIAL_H_

     

    #define _XTAL_FREQ 4000000L

     

    //#ifndef _SERIAL_H_

    #define _SERIAL_H_

     

    #define BAUD 9600     

    #define FOSC 4000000L

    #define NINE 0     /* Use 9bit communication? FALSE=8bit */

     

    #define DIVIDER ((int)(FOSC/(16UL * BAUD) -1))

    #define HIGH_SPEED 1

     

    #if NINE == 1

    #define NINE_BITS 0x40

    #else

    #define NINE_BITS 0

    #endif

     

    #if HIGH_SPEED == 1

    #define SPEED 0x4

    #else

    #define SPEED 0

    #endif

    #define RX_PIN TRISC7

    #define TX_PIN TRISC6

     

    /* Serial initialization */

    #define init_comms()

                RX_PIN = 1;     

                TX_PIN = 1;                   

                SPBRG = DIVIDER;       

                RCSTA = (NINE_BITS|0x90);     

                TXSTA = (SPEED|NINE_BITS|0x20)

    #endif

    __CONFIG(XT & WDTDIS & PWRTEN & BORDIS & LVPDIS &

     

    main()

    {

    INTCON = 0;

    init_comms();

     wait(10);

     lcd_init();        

     wait(10);

    clearBuffer();

    lcd_clear();

    i=0;

    Tx_string(“ATr”);

    while(RCIF){

    buffer=RCREG;

    i++;

    }

    buffer= ‘’;

     

    for(i=0;buffer!=’’;i++)

    {

      buffer+= 0x30;

      lcd_goto(0x00+i);

      wait(10);

      lcd_putch(buffer);

      wait(50);

    } while(1);  

     

     

    void clearBuffer()

    {

         for(i = 0;i < 95;i++)buffer = ‘ ‘;

     

    }

     

     

     

    Thanks

    March 1, 2014 at 4:48 am #11131
    AJISH ALFRED
    Participant

    Hi,

    Could you please make your query more clear ?

    March 12, 2014 at 4:30 am #11290
    manimaran
    Participant

    You have to wait untill a 0x0d or to receive after that u can display the data..

     

    I dont know why are u saying about 0x30..

  • 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